added new models to store the registrant info anoop
authornishanth
Wed, 14 Jul 2010 15:25:36 +0530
branchanoop
changeset 81 8218d96eb765
parent 80 c200156c80a9
child 82 408f2bee9abb
added new models to store the registrant info
sdi/models.py
--- a/sdi/models.py	Wed Jul 14 11:51:05 2010 +0530
+++ b/sdi/models.py	Wed Jul 14 15:25:36 2010 +0530
@@ -42,6 +42,25 @@
                    ("XL","XL"),                   
                   )
 
+SPRINT_CHOICES = (("3", "Will sprint for sure"),
+                  ("2", "May sprint"),
+                  ("1", "Not my cup of tea"))
+
+EVENT_ATTEND_CHOICES = (("5", "Is attending"),
+                        ("3", "Has been selected but not confirmed participation"),
+                        ("1", "Has registered and is willing to attend"),
+                        ("0", "has registered but might not attend"))
+
+WORKSHOP_ATTEND_CHOICES = (("3", "Is attending"),
+                           ("2", "Has been selected but not confirmed participation"),
+                           ("1", "Has requested for a workshop"),
+                           ("0", "Does not need a workshop"))
+
+ACCO_CHOICES = (("3", "Has been given accomodation and has confirmed the stay"),
+                ("2", "Has been given acco but not confirmed yet"),
+                ("1", "Has requested for accomodation"),
+                ("0", "Does not need acco"))
+
 class Registrant(models.Model):
     """ A model to hold the details of registered users.
     """
@@ -76,3 +95,21 @@
     def __unicode__(self):
 
         return self.first_name + " " + self.last_name
+
+class ParticipantInfo(models.Model):
+
+    participant = models.ForeignKey(Registrant)
+    has_laptop_for_sagedays = models.BooleanField(verbose_name="Will you bring your own laptop for Sage Days 25", default=False)
+
+    sprinted_already = models.BooleanField(verbose_name="Have you participated in any kind of coding sprints", default=False)
+    will_sprint = models.CharField(max_length=1, verbose_name="Will you sprint", 
+                                   default='1', choices=SPRINT_CHOICES)
+   
+class RegistrantInfo(models.Model):
+
+    registrant = models.ForeignKey(Registrant)
+    status_of_attending_sagedays = models.CharField(max_length=1, default="0", choices=EVENT_ATTEND_CHOICES)
+    status_of_attending_python_workshop = models.Charfield(max_length=1, default="0", choices=WORKSHOP_ATTEND_CHOICES)
+    status_of_accomodation = models.CharField(max_length=1, default="0", choices=ACCO_CHOICES)
+    has_laptop_for_python_workshop = models.BooleanField(default=False)
+