sdi/models.py
author nishanth
Sat, 29 May 2010 09:16:38 +0530
changeset 4 ac7eaa878437
child 5 6c4b3796a608
permissions -rw-r--r--
created app named sdi which means Sage Days India
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
4
ac7eaa878437 created app named sdi which means Sage Days India
nishanth
parents:
diff changeset
     1
from django.db import models
ac7eaa878437 created app named sdi which means Sage Days India
nishanth
parents:
diff changeset
     2
ac7eaa878437 created app named sdi which means Sage Days India
nishanth
parents:
diff changeset
     3
GENDER_CHOICES = (('M', "Male"),
ac7eaa878437 created app named sdi which means Sage Days India
nishanth
parents:
diff changeset
     4
                  ("F", "Female"),
ac7eaa878437 created app named sdi which means Sage Days India
nishanth
parents:
diff changeset
     5
                 )
ac7eaa878437 created app named sdi which means Sage Days India
nishanth
parents:
diff changeset
     6
ac7eaa878437 created app named sdi which means Sage Days India
nishanth
parents:
diff changeset
     7
LIKELINESS_CHOICES = (('5', "Will attend at any cost"),
ac7eaa878437 created app named sdi which means Sage Days India
nishanth
parents:
diff changeset
     8
                      ('4', "Will attend most probably"),
ac7eaa878437 created app named sdi which means Sage Days India
nishanth
parents:
diff changeset
     9
                      ('3', "Unsure of attending"),
ac7eaa878437 created app named sdi which means Sage Days India
nishanth
parents:
diff changeset
    10
                      ('2', "Might not attend"),
ac7eaa878437 created app named sdi which means Sage Days India
nishanth
parents:
diff changeset
    11
                      ('1', "Will not attend"),
ac7eaa878437 created app named sdi which means Sage Days India
nishanth
parents:
diff changeset
    12
                     )
ac7eaa878437 created app named sdi which means Sage Days India
nishanth
parents:
diff changeset
    13
ac7eaa878437 created app named sdi which means Sage Days India
nishanth
parents:
diff changeset
    14
ac7eaa878437 created app named sdi which means Sage Days India
nishanth
parents:
diff changeset
    15
class Registrant(models.Model):
ac7eaa878437 created app named sdi which means Sage Days India
nishanth
parents:
diff changeset
    16
    """ A model to hold the details of registered users.
ac7eaa878437 created app named sdi which means Sage Days India
nishanth
parents:
diff changeset
    17
    """
ac7eaa878437 created app named sdi which means Sage Days India
nishanth
parents:
diff changeset
    18
ac7eaa878437 created app named sdi which means Sage Days India
nishanth
parents:
diff changeset
    19
    first_name = models.CharField(max_length=30, required=True)
ac7eaa878437 created app named sdi which means Sage Days India
nishanth
parents:
diff changeset
    20
    last_name =  models.CharField(max_length=30, required=True)
ac7eaa878437 created app named sdi which means Sage Days India
nishanth
parents:
diff changeset
    21
    email = models.EmailField(required=True)
ac7eaa878437 created app named sdi which means Sage Days India
nishanth
parents:
diff changeset
    22
    gender = models.CharField(max_length=1, required=True, choices=GENDER_CHOICES)
ac7eaa878437 created app named sdi which means Sage Days India
nishanth
parents:
diff changeset
    23
ac7eaa878437 created app named sdi which means Sage Days India
nishanth
parents:
diff changeset
    24
    profession = models.CharField(max_length=20, required=True)
ac7eaa878437 created app named sdi which means Sage Days India
nishanth
parents:
diff changeset
    25
    affiliated_to = models.CharField(max_length=30, required=True)
ac7eaa878437 created app named sdi which means Sage Days India
nishanth
parents:
diff changeset
    26
ac7eaa878437 created app named sdi which means Sage Days India
nishanth
parents:
diff changeset
    27
    topics_interested = models.TextField()
ac7eaa878437 created app named sdi which means Sage Days India
nishanth
parents:
diff changeset
    28
    knowledge_of_python = models.TextField()
ac7eaa878437 created app named sdi which means Sage Days India
nishanth
parents:
diff changeset
    29
    need_for_python_workshop = models.BooleanField()
ac7eaa878437 created app named sdi which means Sage Days India
nishanth
parents:
diff changeset
    30
    knowledge_of_sage = models.TextField()
ac7eaa878437 created app named sdi which means Sage Days India
nishanth
parents:
diff changeset
    31
ac7eaa878437 created app named sdi which means Sage Days India
nishanth
parents:
diff changeset
    32
    tools_used = models.TextField()
ac7eaa878437 created app named sdi which means Sage Days India
nishanth
parents:
diff changeset
    33
ac7eaa878437 created app named sdi which means Sage Days India
nishanth
parents:
diff changeset
    34
    phone_num = models.CharField(max_length=15, required=True)
ac7eaa878437 created app named sdi which means Sage Days India
nishanth
parents:
diff changeset
    35
    address = models.TextField()
ac7eaa878437 created app named sdi which means Sage Days India
nishanth
parents:
diff changeset
    36
ac7eaa878437 created app named sdi which means Sage Days India
nishanth
parents:
diff changeset
    37
    likeliness_of_attending = models.CharField(max_length=1, required=True, choices=LIKELINESS_CHOICES)
ac7eaa878437 created app named sdi which means Sage Days India
nishanth
parents:
diff changeset
    38