{% endif %}
{{ form }}
<tr>
- <td colspan="2" class="submitrow">
+ <td class="submitrow">
<input type="submit" value="Login"/>
</td>
+ <td class="submitrow">
+ <a href="{% url 'django.contrib.auth.views.password_reset' %}">
+ Forgot password?
+ </a>
+ </td>
</tr>
</table>
</form>
name='password_change'),
url(r'^user/password-change/done/$', auth_views.password_change_done,
name='password_change_done'),
+ url(r'^user/password-reset/$', auth_views.password_reset,
+ name='password_reset'),
+ url(r'^user/password-reset/mail-sent/$', auth_views.password_reset_done,
+ name='password_reset_done'),
+ url(r'^user/password-reset/(?P<uidb64>[0-9A-Za-z_\-]+)/'
+ r'(?P<token>[0-9A-Za-z]{1,13}-[0-9A-Za-z]{1,20})/$',
+ auth_views.password_reset_confirm,
+ name='password_reset_confirm'),
+ url(r'^user/password-reset/complete/$',
+ auth_views.password_reset_complete,
+ name='password_reset_complete'),
# login/logout
url(r'^user/login/$', auth_views.login,
--- /dev/null
+{% extends "base.html" %}
+
+{% block title %}Password reset completed{% endblock %}
+{% block heading %}Password reset completed{% endblock %}
+
+{% block body %}
+
+<p>Your password has been set. You may go ahead and log in now.</p>
+{% endblock %}
--- /dev/null
+{% extends "base.html" %}
+
+{% block title %}Password reset confirmation{% endblock %}
+{% block heading %}Password reset confirmation{% endblock %}
+
+{% block body %}
+
+{% if validlink %}
+<p>Your username, in case you've forgotten: {{ form.user.get_username }}</p>
+<p>Please enter your new password twice so we can verify you typed it in
+correctly</p>
+
+<form method="post">
+{% csrf_token %}
+
+<table class="form passwordform">
+
+{% if form.errors %}
+ <tr>
+ <td colspan="2" class="error">Please correct the errors below.</p>
+ </tr>
+{% endif %}
+
+
+{% for field in form %}
+ <tr>
+ <td>{{ field.label_tag }}</td>
+ <td>
+ {{ field.errors }}
+ {{ field }}
+{% if field.help_text %}
+ <div class="help_text"/>{{ field.help_text }}</div>
+{% endif %}
+ </td>
+ </tr>
+{% endfor %}
+
+ <tr>
+ <td colspan="2">
+ <input type="submit" value="Set my password" class="default" />
+ </td>
+ </tr>
+
+</table>
+
+</form>
+{% else %}
+<p>The password reset link was invalid, possibly because it has already
+been used. Please request a new password reset.</p>
+{% endif %}
+{% endblock %}
--- /dev/null
+{% extends "base.html" %}
+
+{% block title %}Password reset{% endblock %}
+{% block heading %}Password reset{% endblock %}
+
+{% block body %}
+
+<p>We have emailed you instructions for setting your password.
+You should be receiving them shortly.</p>
+<p>If you don't receive an email, please make sure you've entered the
+address you registered with, and check your spam folder</p>
+
+{% endblock %}
--- /dev/null
+{% autoescape off %}Hi,
+
+You are receiving this email because you requested a password reset for
+your user account on the patchwork patch-tracking system.
+Please visit the following url and choose a new password:
+
+{% block reset_link %}
+{{ protocol }}://{{domain}}{% url 'password_reset_confirm' uidb64=uid token=token %}
+{% endblock %}
+
+Happy patchworking.
+{% endautoescape %}
--- /dev/null
+{% extends "base.html" %}
+
+{% block title %}Password reset{% endblock %}
+{% block heading %}Password reset{% endblock %}
+
+{% block body %}
+
+<p>Forgotten your password? Enter your email address below, and we will
+email instructions for setting a new one.</p>
+
+<form method="post">
+{% csrf_token %}
+
+<table class="form passwordform">
+
+{% if form.errors %}
+ <tr>
+ <td colspan="2" class="error">Please correct the errors below.</p>
+ </tr>
+{% endif %}
+
+
+{% for field in form %}
+ <tr>
+ <td>{{ field.label_tag }}</td>
+ <td>
+ {{ field.errors }}
+ {{ field }}
+{% if field.help_text %}
+ <div class="help_text"/>{{ field.help_text }}</div>
+{% endif %}
+ </td>
+ </tr>
+{% endfor %}
+
+ <tr>
+ <td colspan="2">
+ <input type="submit" value="Reset my password" class="default" />
+ </td>
+ </tr>
+
+</table>
+
+</form>
+{% endblock %}