Commit 15f669c01d954bdfe8a02d1d9037b43f4674ad42
- Date: Fri Jun 13 02:02:05 +0000 2008
- Committer: Michael Trier (mtrier@gmail.com)
- Author: Michael Trier (mtrier@gmail.com)
- Commit SHA1: 15f669c01d954bdfe8a02d1d9037b43f4674ad42
- Tree SHA1: 1b8c000f0914f0e48fd584827fbd9aa404f30bc5
added in templates for auth so tests would work.
Commit diff
| |   |
| 1 | import os |
| 2 | |
| 1 | 3 | SITE_ID = 1 |
| 2 | 4 | USE_I18N = True |
| 3 | 5 | |
| … | … | |
| 29 | 29 | MIDDLEWARE_CLASSES = ( |
| 30 | 30 | 'django.middleware.common.CommonMiddleware', |
| 31 | 31 | ) |
| 32 | |
| 33 | TEMPLATE_DIRS = [ |
| 34 | os.path.join(os.path.dirname(__file__), "templates"), |
| 35 | ] |
| toggle raw diff |
--- a/tests/settings.py
+++ b/tests/settings.py
@@ -1,3 +1,5 @@
+import os
+
SITE_ID = 1
USE_I18N = True
@@ -27,3 +29,7 @@ TEMPLATE_LOADERS = (
MIDDLEWARE_CLASSES = (
'django.middleware.common.CommonMiddleware',
)
+
+TEMPLATE_DIRS = [
+ os.path.join(os.path.dirname(__file__), "templates"),
+]
\ No newline at end of file |
| |   |
| 1 | {% extends "admin/base_site.html" %} |
| 2 | {% load i18n %} |
| 3 | |
| 4 | {% block breadcrumbs %}<div class="breadcrumbs"><a href="../">{% trans 'Home' %}</a></div>{% endblock %} |
| 5 | |
| 6 | {% block content %} |
| 7 | |
| 8 | <p>{% trans "Thanks for spending some quality time with the Web site today." %}</p> |
| 9 | |
| 10 | <p><a href="../">{% trans 'Log in again' %}</a></p> |
| 11 | |
| 12 | {% endblock %} |
| toggle raw diff |
--- /dev/null
+++ b/tests/templates/registration/logged_out.html
@@ -0,0 +1,12 @@
+{% extends "admin/base_site.html" %}
+{% load i18n %}
+
+{% block breadcrumbs %}<div class="breadcrumbs"><a href="../">{% trans 'Home' %}</a></div>{% endblock %}
+
+{% block content %}
+
+<p>{% trans "Thanks for spending some quality time with the Web site today." %}</p>
+
+<p><a href="../">{% trans 'Log in again' %}</a></p>
+
+{% endblock %} |
| |   |
| 1 | {% extends "admin/base_site.html" %} |
| 2 | {% load i18n %} |
| 3 | {% block userlinks %}<a href="../../doc/">{% trans 'Documentation' %}</a> / {% trans 'Change password' %} / <a href="../../logout/">{% trans 'Log out' %}</a>{% endblock %} |
| 4 | {% block breadcrumbs %}<div class="breadcrumbs"><a href="../../">{% trans 'Home' %}</a> › {% trans 'Password change' %}</div>{% endblock %} |
| 5 | |
| 6 | {% block title %}{% trans 'Password change successful' %}{% endblock %} |
| 7 | |
| 8 | {% block content %} |
| 9 | |
| 10 | <h1>{% trans 'Password change successful' %}</h1> |
| 11 | |
| 12 | <p>{% trans 'Your password was changed.' %}</p> |
| 13 | |
| 14 | {% endblock %} |
| toggle raw diff |
--- /dev/null
+++ b/tests/templates/registration/password_change_done.html
@@ -0,0 +1,14 @@
+{% extends "admin/base_site.html" %}
+{% load i18n %}
+{% block userlinks %}<a href="../../doc/">{% trans 'Documentation' %}</a> / {% trans 'Change password' %} / <a href="../../logout/">{% trans 'Log out' %}</a>{% endblock %}
+{% block breadcrumbs %}<div class="breadcrumbs"><a href="../../">{% trans 'Home' %}</a> › {% trans 'Password change' %}</div>{% endblock %}
+
+{% block title %}{% trans 'Password change successful' %}{% endblock %}
+
+{% block content %}
+
+<h1>{% trans 'Password change successful' %}</h1>
+
+<p>{% trans 'Your password was changed.' %}</p>
+
+{% endblock %} |
| |   |
| 1 | {% extends "admin/base_site.html" %} |
| 2 | {% load i18n %} |
| 3 | {% block userlinks %}<a href="../doc/">{% trans 'Documentation' %}</a> / {% trans 'Change password' %} / <a href="../logout/">{% trans 'Log out' %}</a>{% endblock %} |
| 4 | {% block breadcrumbs %}<div class="breadcrumbs"><a href="../">{% trans 'Home' %}</a> › {% trans 'Password change' %}</div>{% endblock %} |
| 5 | |
| 6 | {% block title %}{% trans 'Password change' %}{% endblock %} |
| 7 | |
| 8 | {% block content %} |
| 9 | |
| 10 | <h1>{% trans 'Password change' %}</h1> |
| 11 | |
| 12 | <p>{% trans "Please enter your old password, for security's sake, and then enter your new password twice so we can verify you typed it in correctly." %}</p> |
| 13 | |
| 14 | <form action="" method="post"> |
| 15 | |
| 16 | {% if form.old_password.errors %}{{ form.old_password.html_error_list }}{% endif %} |
| 17 | <p class="aligned wide"><label for="id_old_password">{% trans 'Old password:' %}</label>{{ form.old_password }}</p> |
| 18 | {% if form.new_password1.errors %}{{ form.new_password1.html_error_list }}{% endif %} |
| 19 | <p class="aligned wide"><label for="id_new_password1">{% trans 'New password:' %}</label>{{ form.new_password1 }}</p> |
| 20 | {% if form.new_password2.errors %}{{ form.new_password2.html_error_list }}{% endif %} |
| 21 | <p class="aligned wide"><label for="id_new_password2">{% trans 'Confirm password:' %}</label>{{ form.new_password2 }}</p> |
| 22 | |
| 23 | <p><input type="submit" value="{% trans 'Change my password' %}" /></p> |
| 24 | </form> |
| 25 | |
| 26 | {% endblock %} |
| toggle raw diff |
--- /dev/null
+++ b/tests/templates/registration/password_change_form.html
@@ -0,0 +1,26 @@
+{% extends "admin/base_site.html" %}
+{% load i18n %}
+{% block userlinks %}<a href="../doc/">{% trans 'Documentation' %}</a> / {% trans 'Change password' %} / <a href="../logout/">{% trans 'Log out' %}</a>{% endblock %}
+{% block breadcrumbs %}<div class="breadcrumbs"><a href="../">{% trans 'Home' %}</a> › {% trans 'Password change' %}</div>{% endblock %}
+
+{% block title %}{% trans 'Password change' %}{% endblock %}
+
+{% block content %}
+
+<h1>{% trans 'Password change' %}</h1>
+
+<p>{% trans "Please enter your old password, for security's sake, and then enter your new password twice so we can verify you typed it in correctly." %}</p>
+
+<form action="" method="post">
+
+{% if form.old_password.errors %}{{ form.old_password.html_error_list }}{% endif %}
+<p class="aligned wide"><label for="id_old_password">{% trans 'Old password:' %}</label>{{ form.old_password }}</p>
+{% if form.new_password1.errors %}{{ form.new_password1.html_error_list }}{% endif %}
+<p class="aligned wide"><label for="id_new_password1">{% trans 'New password:' %}</label>{{ form.new_password1 }}</p>
+{% if form.new_password2.errors %}{{ form.new_password2.html_error_list }}{% endif %}
+<p class="aligned wide"><label for="id_new_password2">{% trans 'Confirm password:' %}</label>{{ form.new_password2 }}</p>
+
+<p><input type="submit" value="{% trans 'Change my password' %}" /></p>
+</form>
+
+{% endblock %} |
| |   |
| 1 | {% extends "admin/base_site.html" %} |
| 2 | {% load i18n %} |
| 3 | |
| 4 | {% block breadcrumbs %}<div class="breadcrumbs"><a href="../">{% trans 'Home' %}</a> › {% trans 'Password reset' %}</div>{% endblock %} |
| 5 | |
| 6 | {% block title %}{% trans 'Password reset successful' %}{% endblock %} |
| 7 | |
| 8 | {% block content %} |
| 9 | |
| 10 | <h1>{% trans 'Password reset successful' %}</h1> |
| 11 | |
| 12 | <p>{% trans "We've e-mailed a new password to the e-mail address you submitted. You should be receiving it shortly." %}</p> |
| 13 | |
| 14 | {% endblock %} |
| toggle raw diff |
--- /dev/null
+++ b/tests/templates/registration/password_reset_done.html
@@ -0,0 +1,14 @@
+{% extends "admin/base_site.html" %}
+{% load i18n %}
+
+{% block breadcrumbs %}<div class="breadcrumbs"><a href="../">{% trans 'Home' %}</a> › {% trans 'Password reset' %}</div>{% endblock %}
+
+{% block title %}{% trans 'Password reset successful' %}{% endblock %}
+
+{% block content %}
+
+<h1>{% trans 'Password reset successful' %}</h1>
+
+<p>{% trans "We've e-mailed a new password to the e-mail address you submitted. You should be receiving it shortly." %}</p>
+
+{% endblock %} |
| |   |
| 1 | {% load i18n %} |
| 2 | {% trans "You're receiving this e-mail because you requested a password reset" %} |
| 3 | {% blocktrans %}for your user account at {{ site_name }}{% endblocktrans %}. |
| 4 | |
| 5 | {% blocktrans %}Your new password is: {{ new_password }}{% endblocktrans %} |
| 6 | |
| 7 | {% trans "Feel free to change this password by going to this page:" %} |
| 8 | |
| 9 | http://{{ domain }}/password_change/ |
| 10 | |
| 11 | {% trans "Your username, in case you've forgotten:" %} {{ user.username }} |
| 12 | |
| 13 | {% trans "Thanks for using our site!" %} |
| 14 | |
| 15 | {% blocktrans %}The {{ site_name }} team{% endblocktrans %} |
| toggle raw diff |
--- /dev/null
+++ b/tests/templates/registration/password_reset_email.html
@@ -0,0 +1,15 @@
+{% load i18n %}
+{% trans "You're receiving this e-mail because you requested a password reset" %}
+{% blocktrans %}for your user account at {{ site_name }}{% endblocktrans %}.
+
+{% blocktrans %}Your new password is: {{ new_password }}{% endblocktrans %}
+
+{% trans "Feel free to change this password by going to this page:" %}
+
+http://{{ domain }}/password_change/
+
+{% trans "Your username, in case you've forgotten:" %} {{ user.username }}
+
+{% trans "Thanks for using our site!" %}
+
+{% blocktrans %}The {{ site_name }} team{% endblocktrans %} |
| |   |
| 1 | {% extends "admin/base_site.html" %} |
| 2 | {% load i18n %} |
| 3 | |
| 4 | {% block breadcrumbs %}<div class="breadcrumbs"><a href="../">{% trans 'Home' %}</a> › {% trans 'Password reset' %}</div>{% endblock %} |
| 5 | |
| 6 | {% block title %}{% trans "Password reset" %}{% endblock %} |
| 7 | |
| 8 | {% block content %} |
| 9 | |
| 10 | <h1>{% trans "Password reset" %}</h1> |
| 11 | |
| 12 | <p>{% trans "Forgotten your password? Enter your e-mail address below, and we'll reset your password and e-mail the new one to you." %}</p> |
| 13 | |
| 14 | <form action="" method="post"> |
| 15 | {% if form.email.errors %}{{ form.email.html_error_list }}{% endif %} |
| 16 | <p><label for="id_email">{% trans 'E-mail address:' %}</label> {{ form.email }} <input type="submit" value="{% trans 'Reset my password' %}" /></p> |
| 17 | </form> |
| 18 | |
| 19 | {% endblock %} |
| toggle raw diff |
--- /dev/null
+++ b/tests/templates/registration/password_reset_form.html
@@ -0,0 +1,19 @@
+{% extends "admin/base_site.html" %}
+{% load i18n %}
+
+{% block breadcrumbs %}<div class="breadcrumbs"><a href="../">{% trans 'Home' %}</a> › {% trans 'Password reset' %}</div>{% endblock %}
+
+{% block title %}{% trans "Password reset" %}{% endblock %}
+
+{% block content %}
+
+<h1>{% trans "Password reset" %}</h1>
+
+<p>{% trans "Forgotten your password? Enter your e-mail address below, and we'll reset your password and e-mail the new one to you." %}</p>
+
+<form action="" method="post">
+{% if form.email.errors %}{{ form.email.html_error_list }}{% endif %}
+<p><label for="id_email">{% trans 'E-mail address:' %}</label> {{ form.email }} <input type="submit" value="{% trans 'Reset my password' %}" /></p>
+</form>
+
+{% endblock %} |