reg/models.py
changeset 0 30a0f9e20fd4
child 1 18dc0362f550
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/reg/models.py	Thu Apr 08 16:18:05 2010 +0530
@@ -0,0 +1,33 @@
+from django.db import models
+from django.contrib.auth.models import User
+
+GENDER_CHOICES = (('M', "Male"),
+                  ('F', 'Female'))
+
+PROFESSION_CHOICES = (('S', 'Student'),
+                      ('F', 'Faculty'),
+                      ('P', 'Professional'))
+
+
+class Profile(models.Model):
+    """ A model to hold extra information about the user.
+    """
+
+    user = models.ForeignKey(User, unique=True)
+    gender = models.CharField(max_length=1, choices=GENDER_CHOICES)
+    profession = models.CharField(max_length=1, choices=PROFESSION_CHOICES)
+    affiliated_to = models.CharField(max_length=100, verbose_name="College/Company")
+    interests = models.CharField(max_length=100, verbose_name="Fields of Interest", 
+                                 help_text="Ex: Python, Image Processing, Bio Informatics etc.")
+
+class Event(models.Model):
+    """ A model for the workshop information.
+    """
+
+    title = models.CharField(max_length=100)
+    description = models.TextField()
+    start_date = models.DateField()
+    end_date = models.DateField()
+    attendees = models.ManyToManyField(User, related_name="%(class)s_attendees")
+    organizers = models.ManyToManyField(User, related_name="%(class)s_organizers")
+