Inspired by the write a facebook app app in 20 minutes on Hacker News, I'm writing a facebook app, and the home page works fine: The empty list of poems is displayed. However, I'm having trouble creating a link from one view to another.
I'm using django, here's some 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 I can post to shine light on the problem, and I'll do so. I tried various variations of /create/, /create, and even create/ in urls.py and the link in home.html.
The problem is that I keep getting this message:
400 Bad Request
Missing signed_request.
when trying to click on the link in home.html. Any help from seasoned django, facebook or -developers would appreciated.