[Django]-Login and registration form on one page with Django

0๐Ÿ‘

I think it might be csrf token not found error.If you are using django 1.3 with csrf middleware you have to put csrf token {% csrf_token %} tag with each form posting data like this:

{% extends "admin/base.html" %}
{% load i18n %}

{% block content %}
<form method="post" action=".">{% csrf_token %}

  {{ form.as_p }}

  <input type="submit" value="{% trans 'Submit' %}" />
</form>
{% endblock %}
๐Ÿ‘คAnshul

Leave a comment