summaryrefslogtreecommitdiff
path: root/profiler/models.py
diff options
context:
space:
mode:
authorPrimal Pappachan2012-02-20 10:31:00 +0530
committerPrimal Pappachan2012-02-20 10:31:00 +0530
commiteca126940208efd61576589f97700a9031a04050 (patch)
treed58025adc199f53c30a9f3388bdc51d240fa3707 /profiler/models.py
parent920b04b11c5910a4dd33beba56a6130341d180db (diff)
downloadaloha-eca126940208efd61576589f97700a9031a04050.tar.gz
aloha-eca126940208efd61576589f97700a9031a04050.tar.bz2
aloha-eca126940208efd61576589f97700a9031a04050.zip
added the profiler app and edited allotter models
Diffstat (limited to 'profiler/models.py')
-rw-r--r--profiler/models.py52
1 files changed, 52 insertions, 0 deletions
diff --git a/profiler/models.py b/profiler/models.py
new file mode 100644
index 0000000..4a01147
--- /dev/null
+++ b/profiler/models.py
@@ -0,0 +1,52 @@
+from django.db import models
+
+from django.contrib.auth.models import User
+
+GENDER_CHOICES = (
+ ('Male' : 'Male'),
+ ('Female' : 'Female'),
+)
+
+SUBJECT_CHOICES = (
+ ('001' : 'Physics'),
+ ('002' : 'Mathematics'),
+ ('003' : 'Chemistry')
+)
+
+CATEGORY_CHOICES = (
+ ('GEN' : 'GENERAL'),
+ ('OBC' : 'OTHER BACKWARD CASTE'),
+)
+
+class UserProfile(models.Model):
+ #Mandatory field - Should be unique for an user
+ user = models.ForeignKey(User, unique = True)
+
+ #Custom fields
+ exam_id = models.CharField(max_length=30,
+ verbose_name="Registration number",
+ help_text = "Registration number as given in examination id card")
+
+ subject = models.CharField(verbose_name="Examination Subject",
+ choices = SUBJECT_CHOICES)
+
+ full_name = models.CharField(max_length=50, verbose_name="Full name",
+ help_text ="Name as given in application")
+
+ dob = models.DateField(verbose_name="Date of Birth",
+ help_text="YYYY-MM-DD")
+
+ category = models.CharField(verbose_name="Category",
+ help_text="Category as given in the application",
+ choices = CATEGORY_CHOICES)
+
+
+ def __unicode__(self):
+ return self.exam_id
+
+class Notification(models.Model):
+"""Borrowed from PyTask. Used to send notifications to users from the site
+regarding various announcements."""
+
+ pass
+