Commits

dzhibas committed 44116b4 Draft

adding example templates for registration

Comments (0)

Files changed (16)

registration/templates/registration/activate.html

+{% extends "registration/registration_base.html" %}
+{% block title %}{% if account %}Activation complete{% else %}Activation problem{% endif %}{% endblock %}
+{% block content %}
+{% if account %}
+Thanks {{ account }}, activation complete!  You may now <a href='{% url auth_login %}'>login</a> using the username and password you set at registration.
+{% else %}
+Oops &ndash; it seems that your activation key is invalid.  Please check the url again.
+{% endif %}
+{% endblock %}
+

registration/templates/registration/activation_complete.html

+{% extends "registration/registration_base.html" %}
+{% block title %}Activation complete{% endblock %}
+{% block content %}
+Thanks, activation complete!  You may now <a href='{% url auth_login %}'>login</a> using the username and password you set at registration.
+{% endblock %}
+
+

registration/templates/registration/activation_email.txt

+You (or someone pretending to be you) have asked to register an account at 
+{{ site.name }}.  If this wasn't you, please ignore this email
+and your address will be removed from our records.
+
+To activate this account, please click the following link within the next 
+{{ expiration_days }} days:
+
+http://{{site.domain}}{% url registration_activate activation_key %}
+
+Sincerely,
+{{ site.name }} Management

registration/templates/registration/activation_email_subject.txt

+Account registration for {{ site.name }}

registration/templates/registration/login.html

+{% extends "registration/registration_base.html" %}
+{% block title %}Login{% endblock %}
+{% block content %}
+
+{% if form.errors %}
+<p>Your username and password didn't match. Please try again.</p>
+{% endif %}
+
+<form method="post" action="{% url django.contrib.auth.views.login %}">{% csrf_token %}
+<table>
+<tr>
+    <td>{{ form.username.label_tag }}</td>
+    <td>{{ form.username }}</td>
+</tr>
+<tr>
+    <td>{{ form.password.label_tag }}</td>
+    <td>{{ form.password }}</td>
+</tr>
+</table>
+<p><a href="{% url auth_password_reset %}">Forgot</a> your password?  <a href="{% url registration_register %}">Need an account</a>?</p>
+
+<input type="submit" value="login" />
+<input type="hidden" name="next" value="{{ next }}" />
+</form>
+
+{% endblock %}

registration/templates/registration/logout.html

+{% extends "registration/registration_base.html" %}
+{% block title %}Logged out{% endblock %}
+{% block content %}
+Successfully logged out!
+{% endblock %}

registration/templates/registration/password_change_done.html

+{% extends "registration/registration_base.html" %}
+{% block title %}Password changed{% endblock %}
+{% block content %}
+Password successfully changed!
+{% endblock %}
+

registration/templates/registration/password_change_form.html

+{% extends "registration/registration_base.html" %}
+{% block title %}Change password{% endblock %}
+{% block content %}
+<form method='post' action=''>{% csrf_token %}
+<table>
+    {{ form }}
+    <tr><td></td><td><input type='submit' value="Change password" /></td></tr>
+</table>
+</form>
+{% endblock %}

registration/templates/registration/password_reset_complete.html

+{% extends "registration/registration_base.html" %}
+{% block title %}Password reset complete{% endblock %}
+{% block content %}
+Your password has been reset!  You may now <a href="{{ login_url }}">log in</a>.
+{% endblock %}

registration/templates/registration/password_reset_confirm.html

+{% extends "registration/registration_base.html" %}
+{% block title %}Confirm password reset{% endblock %}
+{% block content %}
+Enter your new password below to reset your password:
+<form method="post" action="">{% csrf_token %}
+<table>
+    {{ form.as_table }}
+    <tr><td></ td><td><input type="submit" value="Set password" /></td></tr>
+</table>
+</form>
+{% endblock %}

registration/templates/registration/password_reset_done.html

+{% extends "registration/registration_base.html" %}
+{% block title %}Password reset{% endblock %}
+{% block content %}
+<p>
+We have sent you an email with a link to reset your password.  Please check
+your email and click the link to continue.
+</p>
+{% endblock %}

registration/templates/registration/password_reset_email.html

+Greetings {% if user.get_full_name %}{{ user.get_full_name }}{% else %}{{ user }}{% endif %},
+
+You are receiving this email because you (or someone pretending to be you)
+requested that your password be reset on the {{ domain }} site.  If you do not 
+wish to reset your password, please ignore this message.
+
+To reset your password, please click the following link, or copy and paste it
+into your web browser:
+
+{{ protocol }}://{{ domain }}{% url auth_password_reset_confirm uid token %}
+
+Your username, in case you've forgotten: {{ user.username }}
+
+
+Best regards,
+{{ site_name }} Management

registration/templates/registration/password_reset_form.html

+{% extends "registration/registration_base.html" %}
+{% block title %}Reset password{% endblock %}
+{% block content %}
+Forgot your password?  Enter your email in the form below and we'll send you
+instructions for creating a new one.
+<form method='post' action=''>{% csrf_token %}
+<table>
+    {{ form }}
+    <tr><td></td><td><input type='submit' value="Reset password" /></td></tr>
+</table>
+</form>
+{% endblock %}

registration/templates/registration/registration_base.html

+{% extends "base.html" %}

registration/templates/registration/registration_complete.html

+{% extends "registration/registration_base.html" %}
+{% block title %}Activation email sent{% endblock %}
+{% block content %}
+An activation email has been sent.  Please check your email and click on the link to activate your account.
+{% endblock %}
+

registration/templates/registration/registration_form.html

+{% extends "registration/registration_base.html" %}
+{% block title %}Register for an account{% endblock %}
+{% block content %}
+<table>
+    <form method='post' action=''>{% csrf_token %}
+        {{ form }}
+        <tr><td></td><td><input type="submit" value="Send activation email" /></td>
+    </form>
+</table>
+{% endblock %}