Django - Invalid block tag: 'csrf_tokan', expected 'endblock' -
i cannot understand why django app not understand template tags. error:
invalid block tag: 'csrf_tokan', expected 'endblock'
urls.py:
urlpatterns = patterns('', url(r'^index/', 'myproj.views.index'), url(r'^admin/', include(admin.site.urls)), )
views.py:
@staff_member_required def index(request): return render(request, 'index.html', locals())
index.html:
{% extends "admin/base.html" %} {% block content %} {% csrf_tokan %} {% endblock %}
any ideas?
you need do:
{% extends "admin/base.html" %} {% block content %} {% csrf_token %} {% endblock %}
Comments
Post a Comment