wietse
unread,Nov 9, 2009, 9:35:20 AM11/9/09Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Django users
Hello,
Running django 1.1.1
I'm going through the tutorial and have run into trouble implementing
a form, I get:
TemplateSyntaxError at /polls/1/
Invalid block tag: 'csrf_token'
I've searched around but find it hard to grok what I need to do. In
settings.py I have:
MIDDLEWARE_CLASSES = (
'django.middleware.common.CommonMiddleware',
'django.contrib.csrf.middleware.CsrfMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
)
The form has a `{% csrf_token %}`, and the view is as per the
tutorial:
def detail(request, poll_id):
p = get_object_or_404(Poll, pk=poll_id)
return render_to_response('polls/detail.html',
{'poll': p},
context_instance=RequestContext(request))
Somewhere I read that if I get this kind of error it means I "have
failed to use the tag loader", but I don't know what that means.
Can somebody show me the way?
Wietse