Added django-registration and its settings.
authorMadhusudan.C.S <madhusudancs@gmail.com>
Fri, 25 Sep 2009 23:54:25 +0530
changeset 8 f0b5ff862c6d
parent 7 4976650293f4
child 9 2c360e775cb0
Added django-registration and its settings.
.hgignore
__init__.py
apache/django.wsgi
conference/__init__.py
conference/forms.py
conference/models.py
conference/tests.py
conference/views.py
images/img01.jpg
images/img02.jpg
images/img03.jpg
images/img04.jpg
images/img05.gif
images/img06.gif
images/img07.gif
images/img08.gif
images/img09.gif
images/img10.gif
images/img11.gif
images/img12.gif
images/img13.gif
images/img14.gif
images/img15.gif
images/img16.gif
images/img17.gif
images/img18.gif
images/img19.gif
images/img20.gif
images/spacer.gif
license.txt
manage.py
settings.py
site-content/default.css
site-content/images/img01.jpg
site-content/images/img02.jpg
site-content/images/img03.jpg
site-content/images/img04.jpg
site-content/images/img05.gif
site-content/images/img06.gif
site-content/images/img07.gif
site-content/images/img08.gif
site-content/images/img09.gif
site-content/images/img10.gif
site-content/images/img11.gif
site-content/images/img12.gif
site-content/images/img13.gif
site-content/images/img14.gif
site-content/images/img15.gif
site-content/images/img16.gif
site-content/images/img17.gif
site-content/images/img18.gif
site-content/images/img19.gif
site-content/images/img20.gif
site-content/images/spacer.gif
template/homepage.html
template/index.html
template/regthank.html
urls.py
--- a/conference/forms.py	Fri Sep 25 00:55:37 2009 +0530
+++ b/conference/forms.py	Fri Sep 25 23:54:25 2009 +0530
@@ -8,7 +8,8 @@
 class ParticipantForm(forms.ModelForm):
   class Meta:
     model = Participant
-    
+
+
 class LoginForm(forms.Form):
 	username = forms.CharField(max_length=30, label=_(u'username'))
 
--- a/conference/models.py	Fri Sep 25 00:55:37 2009 +0530
+++ b/conference/models.py	Fri Sep 25 23:54:25 2009 +0530
@@ -1,6 +1,7 @@
 from datetime import datetime
 
-from django.contrib.auth.models import User, UserManager
+from django.contrib.auth.models import User
+from django.contrib.auth.models import UserManager
 from django.db import models
 from django.forms import ModelForm
 from django.utils.translation import ugettext_lazy as _
@@ -10,6 +11,9 @@
   """Model for holding details of participants
   """
 
+  # This is the only required field
+  user = models.ForeignKey(User, unique=True)
+
   PARTICIPANT_CATEGORY = (
        ('Student','Student'),
        ('Corporate Staff','Corporate Staff'),
@@ -17,18 +21,15 @@
        ('Others','Others'),
 	   )
 
-  username = models.ForeignKey(User, unique=True, related_name='profile')
+  category = models.CharField(max_length=80, choices=PARTICIPANT_CATEGORY)
 
-  email    = models.EmailField(_("Email Address"),unique=True)
- 
-  category = models.CharField(max_length = 80, choices=PARTICIPANT_CATEGORY,)
-
-  organisation = models.CharField(_("Organisation"),max_length=200,blank = True,null = True)
+  organisation = models.CharField(_("Organisation"), max_length=200,
+                                  blank = True, null=True)
 
-  attending_conf = models.BooleanField(verbose_name="Will you attend conference?")
+  attending_conf = models.BooleanField(verbose_name="Will you attend the conference?")
 
-  attending_tut = models.BooleanField(verbose_name="Will you attend tutorial session?")
+  attending_tut = models.BooleanField(verbose_name="Will you attend the tutorial session?")
 
-  attending_sprint = models.BooleanField(verbose_name="Will you attend sprint?")
+  attending_sprint = models.BooleanField(verbose_name="Will you attend the sprint?")
 
-  paper_submission = models.BooleanField(verbose_name="Do you want to Submit paper?")
+  paper_submission = models.BooleanField(verbose_name="Do you want to Submit paper(s)?")
--- a/settings.py	Fri Sep 25 00:55:37 2009 +0530
+++ b/settings.py	Fri Sep 25 23:54:25 2009 +0530
@@ -55,6 +55,8 @@
 # Make this unique, and don't share it with anybody.
 SECRET_KEY = '(ob412sq1npyyuvfi*b@eby$ip=1rfl*l*b%8f4&l@)3iu$&4#'
 
+AUTH_PROFILE_MODULE = 'conference.participant'
+
 # List of callables that know how to import templates from various sources.
 TEMPLATE_LOADERS = (
     'django.template.loaders.filesystem.load_template_source',
@@ -83,4 +85,7 @@
     'django.contrib.sessions',
     'django.contrib.sites',
     'scipy.conference',
+    'registration',
 )
+
+ACCOUNT_ACTIVATION_DAYS = 0
--- a/template/index.html	Fri Sep 25 00:55:37 2009 +0530
+++ b/template/index.html	Fri Sep 25 23:54:25 2009 +0530
@@ -79,12 +79,13 @@
 <!-- start footer -->
 <div id="footer">
 	<p class="links">
-		<a href="http://validator.w3.org/check/referer" class="xhtml" title="This page validates as XHTML">Valid <abbr title="eXtensible HyperText Markup Language">XHTML</abbr></a>
+<!--		<a href="http://validator.w3.org/check/referer" class="xhtml" title="This page validates as XHTML">Valid <abbr title="eXtensible HyperText Markup Language">XHTML</abbr></a>
 		&nbsp;&nbsp;&nbsp;
 		<a href="http://jigsaw.w3.org/css-validator/check/referer" class="css" title="This page validates as CSS">Valid <abbr title="Cascading Style Sheets">CSS</abbr></a>
+		-->
 	</p>
 	<p class="legal">
-		&copy;2007 Concrete. All Rights Reserved.
+		&copy;2009 FOSSEE Group. All Rights Reserved.
 		&nbsp;&nbsp;&bull;&nbsp;&nbsp;
 		Design by <a href="http://www.freecsstemplates.org/">Free CSS Templates</a>
 		&nbsp;&nbsp;&bull;&nbsp;&nbsp;
--- a/urls.py	Fri Sep 25 00:55:37 2009 +0530
+++ b/urls.py	Fri Sep 25 23:54:25 2009 +0530
@@ -19,6 +19,7 @@
     # Uncomment the next line to enable the admin:
     # (r'^admin/', include(admin.site.urls)),
     url (r'^$', direct_to_template, {"template": "homepage.html"}, name="home"),
+    (r'^accounts/', include('registration.urls')),
     (r'^register/','conference.views.register'),
     (r'^logout/','conference.views.logout'),
     (r'^regthank/(?P<id>\d+)/$', 'conference.views.regthank'),