Inspired by writing the application for the facebook application after 20 minutes in Hacker News, I am writing the application for facebook, and the home page works fine: an empty list of poems is displayed. However, I am unable to create a link from one view to another.
I am using django, here is the code:
from urls.py
urlpatterns = patterns('', url(r'^$', 'crosswords.ugly.views.home', name='home'), url(r'^create/$', 'crosswords.ugly.views.create', name='create'),
From views.py:
@canvas_only def create(request): if request.method == 'GET': return render(request, 'create.html', { 'form': PoemEntryForm(request.GET) })
From: templates: home.html
<p>Would you like to create a <a href="/create/">new poem</a>?</p>
Please let me know if there are any specific files that I can publish to highlight the problem, and I will do it. I tried various options for / create /, / create and even created / in urls.py and a link in home.html.
The problem is that I keep getting this message:
400 Bad Request
Missing signed_request.
when trying to click a link in home.html. Any help from experienced django, facebook or -developers would be appreciated.