Added django-registration and its settings.
--- 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>
<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">
- ©2007 Concrete. All Rights Reserved.
+ ©2009 FOSSEE Group. All Rights Reserved.
•
Design by <a href="http://www.freecsstemplates.org/">Free CSS Templates</a>
•
--- 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'),