forked from expo/troggle
Add CSRF protection to registration form (and remove annoying second
password)
This commit is contained in:
@@ -9,7 +9,7 @@ registration_form.html | {{ block.super }}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<form action="{% url registration_register %}" method="POST">
|
||||
<form action="{% url registration_register %}" method="POST">{% csrf_token %}
|
||||
{% for error in form.non_field_errors %}
|
||||
<span style="color:red">{{ error }}</span>
|
||||
{% endfor %}
|
||||
@@ -41,15 +41,6 @@ registration_form.html | {{ block.super }}
|
||||
{% endfor %}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right" valign="top">Password (again):</td>
|
||||
<td>
|
||||
{{ form.password2 }} <br/>
|
||||
{% for error in form.password2.errors %}
|
||||
<span style="color:red">{{ error }}</span>
|
||||
{% endfor %}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td><input type="submit" value="Register" /></td>
|
||||
|
||||
Reference in New Issue
Block a user