From b323e1c5ae15c7fddf4c33ffcfc90c21f082d165 Mon Sep 17 00:00:00 2001 From: Sanj Date: Wed, 3 Aug 2011 16:46:12 +0530 Subject: [PATCH] registration stuff --- itf/settings.py | 2 + itf/templates/registration/.svn/all-wcprops | 53 ++++ itf/templates/registration/.svn/entries | 300 ++++++++++++++++++ .../.svn/text-base/logged_out.html.svn-base | 1 + .../.svn/text-base/login.html.svn-base | 1 + .../password_change_form.html.svn-base | 1 + .../password_reset_complete.html.svn-base | 1 + .../password_reset_confirm.html.svn-base | 5 + .../password_reset_done.html.svn-base | 1 + .../password_reset_email.html.svn-base | 1 + .../password_reset_form.html.svn-base | 1 + itf/templates/registration/activate.html | 4 + .../registration/activation_complete.html | 5 + .../registration/activation_email.txt | 1 + .../registration/activation_email_subject.txt | 1 + itf/templates/registration/logged_out.html | 26 +- itf/templates/registration/login.html | 23 ++ .../registration/password_change_form.html | 27 +- .../registration/password_reset_complete.html | 17 +- .../registration/password_reset_confirm.html | 30 +- .../registration/password_reset_done.html | 15 +- .../registration/password_reset_email.html | 16 +- .../registration/password_reset_form.html | 20 +- itf/templates/registration/register_base.html | 9 + .../registration/registration_complete.html | 5 + .../registration/registration_form.html | 8 + itf/urls.py | 3 +- 27 files changed, 459 insertions(+), 118 deletions(-) create mode 100644 itf/templates/registration/.svn/all-wcprops create mode 100644 itf/templates/registration/.svn/entries create mode 100644 itf/templates/registration/.svn/text-base/logged_out.html.svn-base create mode 100644 itf/templates/registration/.svn/text-base/login.html.svn-base create mode 100644 itf/templates/registration/.svn/text-base/password_change_form.html.svn-base create mode 100644 itf/templates/registration/.svn/text-base/password_reset_complete.html.svn-base create mode 100644 itf/templates/registration/.svn/text-base/password_reset_confirm.html.svn-base create mode 100644 itf/templates/registration/.svn/text-base/password_reset_done.html.svn-base create mode 100644 itf/templates/registration/.svn/text-base/password_reset_email.html.svn-base create mode 100644 itf/templates/registration/.svn/text-base/password_reset_form.html.svn-base create mode 100644 itf/templates/registration/activate.html create mode 100644 itf/templates/registration/activation_complete.html create mode 100644 itf/templates/registration/activation_email.txt create mode 100644 itf/templates/registration/activation_email_subject.txt create mode 100644 itf/templates/registration/login.html create mode 100644 itf/templates/registration/register_base.html create mode 100644 itf/templates/registration/registration_complete.html create mode 100644 itf/templates/registration/registration_form.html diff --git a/itf/settings.py b/itf/settings.py index 1f29996..9e88175 100644 --- a/itf/settings.py +++ b/itf/settings.py @@ -135,6 +135,7 @@ INSTALLED_APPS = ( 'django.contrib.sites', 'django.contrib.admin', 'django.contrib.comments', + 'registration', # 'itfcore', 'festival', 'erang_organised', @@ -156,6 +157,7 @@ INSTALLED_APPS = ( 'ckeditor', ) +ACCOUNT_ACTIVATION_DAYS = 30 #overwrite default settings with local settings try: from local_settings import * diff --git a/itf/templates/registration/.svn/all-wcprops b/itf/templates/registration/.svn/all-wcprops new file mode 100644 index 0000000..6549c09 --- /dev/null +++ b/itf/templates/registration/.svn/all-wcprops @@ -0,0 +1,53 @@ +K 25 +svn:wc:ra_dav:version-url +V 81 +/svn/!svn/ver/14003/django/trunk/django/contrib/auth/tests/templates/registration +END +password_reset_complete.html +K 25 +svn:wc:ra_dav:version-url +V 110 +/svn/!svn/ver/12420/django/trunk/django/contrib/auth/tests/templates/registration/password_reset_complete.html +END +password_reset_confirm.html +K 25 +svn:wc:ra_dav:version-url +V 109 +/svn/!svn/ver/12420/django/trunk/django/contrib/auth/tests/templates/registration/password_reset_confirm.html +END +password_reset_form.html +K 25 +svn:wc:ra_dav:version-url +V 106 +/svn/!svn/ver/12420/django/trunk/django/contrib/auth/tests/templates/registration/password_reset_form.html +END +logged_out.html +K 25 +svn:wc:ra_dav:version-url +V 97 +/svn/!svn/ver/14003/django/trunk/django/contrib/auth/tests/templates/registration/logged_out.html +END +login.html +K 25 +svn:wc:ra_dav:version-url +V 91 +/svn/!svn/ver/8497/django/trunk/django/contrib/auth/tests/templates/registration/login.html +END +password_reset_done.html +K 25 +svn:wc:ra_dav:version-url +V 106 +/svn/!svn/ver/12420/django/trunk/django/contrib/auth/tests/templates/registration/password_reset_done.html +END +password_change_form.html +K 25 +svn:wc:ra_dav:version-url +V 107 +/svn/!svn/ver/14003/django/trunk/django/contrib/auth/tests/templates/registration/password_change_form.html +END +password_reset_email.html +K 25 +svn:wc:ra_dav:version-url +V 107 +/svn/!svn/ver/12420/django/trunk/django/contrib/auth/tests/templates/registration/password_reset_email.html +END diff --git a/itf/templates/registration/.svn/entries b/itf/templates/registration/.svn/entries new file mode 100644 index 0000000..3ffbc9c --- /dev/null +++ b/itf/templates/registration/.svn/entries @@ -0,0 +1,300 @@ +10 + +dir +15449 +http://code.djangoproject.com/svn/django/trunk/django/contrib/auth/tests/templates/registration +http://code.djangoproject.com/svn + + + +2010-10-08T13:50:54.908742Z +14003 +russellm + + + + + + + + + + + + + + +bcc190cf-cafb-0310-a4f2-bffc1f526a37 + +password_reset_complete.html +file + + + + +2011-02-08T11:05:45.677065Z +b086e39450cc1801a75d6eb86f9642b8 +2010-02-13T12:02:11.708906Z +12420 +russellm + + + + + + + + + + + + + + + + + + + + + +27 + +password_reset_confirm.html +file + + + + +2011-02-08T11:05:45.677065Z +8c94e1c987778dc8ff3376e7fa38d5ae +2010-02-13T12:02:11.708906Z +12420 +russellm + + + + + + + + + + + + + + + + + + + + + +120 + +password_reset_form.html +file + + + + +2011-02-08T11:05:45.677065Z +c940547712a34ed88f1ce2fbbd0defee +2010-02-13T12:02:11.708906Z +12420 +russellm + + + + + + + + + + + + + + + + + + + + + +10 + +logged_out.html +file + + + + +2011-02-08T11:05:45.677065Z +213c9cdec05da9c0102d625e71d52769 +2010-10-08T13:50:54.908742Z +14003 +russellm + + + + + + + + + + + + + + + + + + + + + +10 + +login.html +file + + + + +2011-02-08T11:05:45.677065Z +e56718e1b6e87fb618d296bb52cd15ee +2008-08-23T18:20:49.470504Z +8497 +mtredinnick + + + + + + + + + + + + + + + + + + + + + +16 + +password_reset_done.html +file + + + + +2011-02-08T11:05:45.677065Z +6e96998ce833f63031ef6f66a7693586 +2010-02-13T12:02:11.708906Z +12420 +russellm + + + + + + + + + + + + + + + + + + + + + +11 + +password_change_form.html +file + + + + +2011-02-08T11:05:45.677065Z +c940547712a34ed88f1ce2fbbd0defee +2010-10-08T13:50:54.908742Z +14003 +russellm + + + + + + + + + + + + + + + + + + + + + +10 + +password_reset_email.html +file + + + + +2011-02-08T11:05:45.677065Z +3c3a5c49b9d1b6802ca1dfe360a06a64 +2010-02-13T12:02:11.708906Z +12420 +russellm + + + + + + + + + + + + + + + + + + + + + +58 + diff --git a/itf/templates/registration/.svn/text-base/logged_out.html.svn-base b/itf/templates/registration/.svn/text-base/logged_out.html.svn-base new file mode 100644 index 0000000..d690653 --- /dev/null +++ b/itf/templates/registration/.svn/text-base/logged_out.html.svn-base @@ -0,0 +1 @@ +Logged out \ No newline at end of file diff --git a/itf/templates/registration/.svn/text-base/login.html.svn-base b/itf/templates/registration/.svn/text-base/login.html.svn-base new file mode 100644 index 0000000..027da71 --- /dev/null +++ b/itf/templates/registration/.svn/text-base/login.html.svn-base @@ -0,0 +1 @@ +{{ form.as_ul }} \ No newline at end of file diff --git a/itf/templates/registration/.svn/text-base/password_change_form.html.svn-base b/itf/templates/registration/.svn/text-base/password_change_form.html.svn-base new file mode 100644 index 0000000..d960111 --- /dev/null +++ b/itf/templates/registration/.svn/text-base/password_change_form.html.svn-base @@ -0,0 +1 @@ +{{ form }} \ No newline at end of file diff --git a/itf/templates/registration/.svn/text-base/password_reset_complete.html.svn-base b/itf/templates/registration/.svn/text-base/password_reset_complete.html.svn-base new file mode 100644 index 0000000..3dd79d8 --- /dev/null +++ b/itf/templates/registration/.svn/text-base/password_reset_complete.html.svn-base @@ -0,0 +1 @@ +Password reset successfully \ No newline at end of file diff --git a/itf/templates/registration/.svn/text-base/password_reset_confirm.html.svn-base b/itf/templates/registration/.svn/text-base/password_reset_confirm.html.svn-base new file mode 100644 index 0000000..8f06c57 --- /dev/null +++ b/itf/templates/registration/.svn/text-base/password_reset_confirm.html.svn-base @@ -0,0 +1,5 @@ +{% if validlink %} +Please enter your new password: {{ form }} +{% else %} +The password reset link was invalid +{% endif %} \ No newline at end of file diff --git a/itf/templates/registration/.svn/text-base/password_reset_done.html.svn-base b/itf/templates/registration/.svn/text-base/password_reset_done.html.svn-base new file mode 100644 index 0000000..d56b10f --- /dev/null +++ b/itf/templates/registration/.svn/text-base/password_reset_done.html.svn-base @@ -0,0 +1 @@ +E-mail sent \ No newline at end of file diff --git a/itf/templates/registration/.svn/text-base/password_reset_email.html.svn-base b/itf/templates/registration/.svn/text-base/password_reset_email.html.svn-base new file mode 100644 index 0000000..1b9a482 --- /dev/null +++ b/itf/templates/registration/.svn/text-base/password_reset_email.html.svn-base @@ -0,0 +1 @@ +{{ protocol }}://{{ domain }}/reset/{{ uid }}-{{ token }}/ \ No newline at end of file diff --git a/itf/templates/registration/.svn/text-base/password_reset_form.html.svn-base b/itf/templates/registration/.svn/text-base/password_reset_form.html.svn-base new file mode 100644 index 0000000..d960111 --- /dev/null +++ b/itf/templates/registration/.svn/text-base/password_reset_form.html.svn-base @@ -0,0 +1 @@ +{{ form }} \ No newline at end of file diff --git a/itf/templates/registration/activate.html b/itf/templates/registration/activate.html new file mode 100644 index 0000000..f7b1487 --- /dev/null +++ b/itf/templates/registration/activate.html @@ -0,0 +1,4 @@ +{% extends 'registration/register_base.html' %} +{% block reg_content %} + Account activation failed. +{% endblock %} diff --git a/itf/templates/registration/activation_complete.html b/itf/templates/registration/activation_complete.html new file mode 100644 index 0000000..e25ed4d --- /dev/null +++ b/itf/templates/registration/activation_complete.html @@ -0,0 +1,5 @@ +{% extends 'registration/register_base.html' %} + +{% block reg_content %} + Account activated. Thanks. +{% endblock %} diff --git a/itf/templates/registration/activation_email.txt b/itf/templates/registration/activation_email.txt new file mode 100644 index 0000000..60e6528 --- /dev/null +++ b/itf/templates/registration/activation_email.txt @@ -0,0 +1 @@ +Please activate your registration. How, remains a mystery. diff --git a/itf/templates/registration/activation_email_subject.txt b/itf/templates/registration/activation_email_subject.txt new file mode 100644 index 0000000..2b9ecec --- /dev/null +++ b/itf/templates/registration/activation_email_subject.txt @@ -0,0 +1 @@ +Please Confirm Registration on Theatreforum.in diff --git a/itf/templates/registration/logged_out.html b/itf/templates/registration/logged_out.html index d339ef0..438ad4e 100755 --- a/itf/templates/registration/logged_out.html +++ b/itf/templates/registration/logged_out.html @@ -1,12 +1,20 @@ -{% extends "admin/base_site.html" %} -{% load i18n %} +{% extends 'registration/register_base.html' %} -{% block breadcrumbs %}{% endblock %} - -{% block content %} - -

{% trans "Thanks for spending some quality time with the Web site today." %}

- -

{% trans 'Log in again' %}

+{% block title %} + Logout +{% endblock %} + +{% block extra_head %} + +{% endblock %} + +{% block pageTitle %} + Logout +{% endblock %} + + +{% block reg_content %} +
You have been logged out.
Thanks for using the site, and see you again soon!
Bye!
:)
+ {% endblock %} diff --git a/itf/templates/registration/login.html b/itf/templates/registration/login.html new file mode 100644 index 0000000..c10366d --- /dev/null +++ b/itf/templates/registration/login.html @@ -0,0 +1,23 @@ +{% extends 'registration/register_base.html' %} + +{% block title %} + Login +{% endblock %} + +{% block extra_head %} + +{% endblock %} + +{% block pageTitle %} + Login +{% endblock %} + +{% block content %} +
+
+{{ form.as_ul }}
+ +
+
+ +{% endblock %} diff --git a/itf/templates/registration/password_change_form.html b/itf/templates/registration/password_change_form.html index c13c7f7..3a7476b 100755 --- a/itf/templates/registration/password_change_form.html +++ b/itf/templates/registration/password_change_form.html @@ -1,26 +1,5 @@ -{% extends "admin/base_site.html" %} -{% load i18n %} -{% block userlinks %}{% url django-admindocs-docroot as docsroot %}{% if docsroot %}{% trans 'Documentation' %} / {% endif %} {% trans 'Change password' %} / {% trans 'Log out' %}{% endblock %} -{% block breadcrumbs %}{% endblock %} - -{% block title %}{% trans 'Password change' %}{% endblock %} - -{% block content %} - -

{% trans 'Password change' %}

- -

{% 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." %}

- -
- -{{ form.old_password.errors }} -

{{ form.old_password }}

-{{ form.new_password1.errors }} -

{{ form.new_password1 }}

-{{ form.new_password2.errors }} -

{{ form.new_password2 }}

- -

-
+{% extends 'registration/register_base.html' %} +{% block reg_content %} + {{ form }} {% endblock %} diff --git a/itf/templates/registration/password_reset_complete.html b/itf/templates/registration/password_reset_complete.html index fceb167..e385886 100755 --- a/itf/templates/registration/password_reset_complete.html +++ b/itf/templates/registration/password_reset_complete.html @@ -1,16 +1,5 @@ -{% extends "admin/base_site.html" %} -{% load i18n %} - -{% block breadcrumbs %}{% endblock %} - -{% block title %}{% trans 'Password reset complete' %}{% endblock %} - -{% block content %} - -

{% trans 'Password reset complete' %}

- -

{% trans "Your password has been set. You may go ahead and log in now." %}

- -

{% trans 'Log in' %}

+{% extends 'registration/register_base.html' %} +{% block reg_content %} + Password reset successfully {% endblock %} diff --git a/itf/templates/registration/password_reset_confirm.html b/itf/templates/registration/password_reset_confirm.html index 0d3eb38..6fff2bc 100755 --- a/itf/templates/registration/password_reset_confirm.html +++ b/itf/templates/registration/password_reset_confirm.html @@ -1,32 +1,10 @@ -{% extends "admin/base_site.html" %} -{% load i18n %} - -{% block breadcrumbs %}{% endblock %} - -{% block title %}{% trans 'Password reset' %}{% endblock %} - -{% block content %} +{% extends 'registration/register_base.html' %} +{% block reg_content %} {% if validlink %} - -

{% trans 'Enter new password' %}

- -

{% trans "Please enter your new password twice so we can verify you typed it in correctly." %}

- -
-{{ form.new_password1.errors }} -

{{ form.new_password1 }}

-{{ form.new_password2.errors }} -

{{ form.new_password2 }}

-

-
- +Please enter your new password: {{ form }} {% else %} - -

{% trans 'Password reset unsuccessful' %}

- -

{% trans "The password reset link was invalid, possibly because it has already been used. Please request a new password reset." %} - +The password reset link was invalid {% endif %} {% endblock %} diff --git a/itf/templates/registration/password_reset_done.html b/itf/templates/registration/password_reset_done.html index e223bdb..2d04555 100755 --- a/itf/templates/registration/password_reset_done.html +++ b/itf/templates/registration/password_reset_done.html @@ -1,14 +1,5 @@ -{% extends "admin/base_site.html" %} -{% load i18n %} - -{% block breadcrumbs %}

{% endblock %} - -{% block title %}{% trans 'Password reset successful' %}{% endblock %} - -{% block content %} - -

{% trans 'Password reset successful' %}

- -

{% trans "We've e-mailed you instructions for setting your password to the e-mail address you submitted. You should be receiving it shortly." %}

+{% extends 'registration/register_base.html' %} +{% block reg_content %} + E-mail sent {% endblock %} diff --git a/itf/templates/registration/password_reset_email.html b/itf/templates/registration/password_reset_email.html index 4e4bd6d..1b9a482 100755 --- a/itf/templates/registration/password_reset_email.html +++ b/itf/templates/registration/password_reset_email.html @@ -1,15 +1 @@ -{% load i18n %}{% autoescape off %} -{% trans "You're receiving this e-mail because you requested a password reset" %} -{% blocktrans %}for your user account at {{ site_name }}{% endblocktrans %}. - -{% trans "Please go to the following page and choose a new password:" %} -{% block reset_link %} -{{ protocol }}://{{ domain }}{% url django.contrib.auth.views.password_reset_confirm uidb36=uid, token=token %} -{% endblock %} -{% trans "Your username, in case you've forgotten:" %} {{ user.username }} - -{% trans "Thanks for using our site!" %} - -{% blocktrans %}The {{ site_name }} team{% endblocktrans %} - -{% endautoescape %} +{{ protocol }}://{{ domain }}/reset/{{ uid }}-{{ token }}/ \ No newline at end of file diff --git a/itf/templates/registration/password_reset_form.html b/itf/templates/registration/password_reset_form.html index 704066c..3a7476b 100755 --- a/itf/templates/registration/password_reset_form.html +++ b/itf/templates/registration/password_reset_form.html @@ -1,19 +1,5 @@ -{% extends "admin/base_site.html" %} -{% load i18n %} - -{% block breadcrumbs %}{% endblock %} - -{% block title %}{% trans "Password reset" %}{% endblock %} - -{% block content %} - -

{% trans "Password reset" %}

- -

{% trans "Forgotten your password? Enter your e-mail address below, and we'll e-mail instructions for setting a new one." %}

- -
-{{ form.email.errors }} -

{{ form.email }}

-
+{% extends 'registration/register_base.html' %} +{% block reg_content %} + {{ form }} {% endblock %} diff --git a/itf/templates/registration/register_base.html b/itf/templates/registration/register_base.html new file mode 100644 index 0000000..a47873a --- /dev/null +++ b/itf/templates/registration/register_base.html @@ -0,0 +1,9 @@ +{% extends "noel/base.html" %} + +{% block content %} + + {% block reg_content %} + + {% endblock %} + +{% endblock %} diff --git a/itf/templates/registration/registration_complete.html b/itf/templates/registration/registration_complete.html new file mode 100644 index 0000000..a89ef48 --- /dev/null +++ b/itf/templates/registration/registration_complete.html @@ -0,0 +1,5 @@ +{% extends 'registration/register_base.html' %} + +{% block reg_content %} + Registered. +{% endblock %} diff --git a/itf/templates/registration/registration_form.html b/itf/templates/registration/registration_form.html new file mode 100644 index 0000000..76aabb7 --- /dev/null +++ b/itf/templates/registration/registration_form.html @@ -0,0 +1,8 @@ +{% extends 'registration/register_base.html' %} + +{% block reg_content %} +
+ {{ form.as_p }} + +
+{% endblock %} diff --git a/itf/urls.py b/itf/urls.py index 13b8f70..5a7f78d 100644 --- a/itf/urls.py +++ b/itf/urls.py @@ -3,6 +3,7 @@ import settings import os from os.path import join from django.views.generic.simple import direct_to_template +# from django.auth.views import login, logout, register, # Uncomment the next two lines to enable the admin: from django.contrib import admin @@ -24,7 +25,7 @@ urlpatterns = patterns('', (r'jsdoc/', 'api.views.jsdoc'), (r'site.json', 'app.views.site_json'), (r'^itf/', include('festival.urls')), - + (r'^accounts/', include('registration.urls')), (r'^admin/(.*)', admin.site.root), ('^getLanguages', 'itfcore.views.getLanguages'), # Uncomment the admin/doc line below and add 'django.contrib.admindocs'