From eca126940208efd61576589f97700a9031a04050 Mon Sep 17 00:00:00 2001 From: Primal Pappachan Date: Mon, 20 Feb 2012 10:31:00 +0530 Subject: added the profiler app and edited allotter models --- profiler/models.py | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 profiler/models.py (limited to 'profiler/models.py') 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 + -- cgit