Hey, I am following this tutorial to learn to make a wiki page with Django. However, it is made in django 0.96 and I use Django 1.3 so there are some things that are different.
You've got to include {% csrf_token %}
in your form's template between your tags.
If the csrf_token
is not rendered into your form make sure you're providing the RequestContext
in the view's response:
from django.shortcuts import render_to_response
from django.template import RequestContext
def app_view(request):
return render_to_response('app_template.html',
app_data_dictionary,
context_instance=RequestContext(request))
Or, use this shortcut method:
from django.views.generic.simple import direct_to_template
def app_view(request):
return direct_to_template(request, 'app_template.html', app_data_dictionary)
The RequestContext
is always available when you're using generic views.