conference/models.py
changeset 8 f0b5ff862c6d
parent 6 4e819dd96e1f
--- 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)?")