user should enter unique email address, changed login_redirect_url.
authoranoop
Mon, 22 Feb 2010 17:35:19 +0530
changeset 47 4e059a4220cc
parent 46 7dd834f5f493
child 48 8670846be981
user should enter unique email address, changed login_redirect_url.
settings.py
taskapp/forms/user.py
--- a/settings.py	Fri Feb 19 21:49:00 2010 +0530
+++ b/settings.py	Mon Feb 22 17:35:19 2010 +0530
@@ -74,6 +74,8 @@
 
 ACCOUNT_ACTIVATION_DAYS = 5
 
+LOGIN_REDIRECT_URL = '/'
+
 INSTALLED_APPS = (
     'django.contrib.auth',
     'django.contrib.contenttypes',
--- a/taskapp/forms/user.py	Fri Feb 19 21:49:00 2010 +0530
+++ b/taskapp/forms/user.py	Mon Feb 22 17:35:19 2010 +0530
@@ -3,7 +3,7 @@
 from django import forms
 from pytask.taskapp.models import GENDER_CHOICES, Profile
 from django.forms import ModelForm
-from registration.forms import RegistrationForm
+from registration.forms import RegistrationFormUniqueEmail
 from registration.models import RegistrationProfile
 
 class UserProfileEditForm(ModelForm):
@@ -13,7 +13,7 @@
         model = Profile
         exclude = ('user','rights','dob','credits')
 
-class RegistrationFormCustom(RegistrationForm):
+class RegistrationFormCustom(RegistrationFormUniqueEmail):
     """Used instead of RegistrationForm used by default django-registration backend, this adds date of birth and gender to the default django-registration RegistrationForm"""
     
     dob = forms.DateField(help_text = "YYYY-MM-DD", required=True, label=u'date of birth')