conference/models.py
author Madhusudan.C.S <madhusudancs@gmail.com>
Fri, 25 Sep 2009 00:27:42 +0530
changeset 6 4e819dd96e1f
child 8 f0b5ff862c6d
permissions -rw-r--r--
Restructured and revamped the entire settings.

from datetime import datetime

from django.contrib.auth.models import User, UserManager
from django.db import models
from django.forms import ModelForm
from django.utils.translation import ugettext_lazy as _


class Participant(models.Model):  
  """Model for holding details of participants
  """

  PARTICIPANT_CATEGORY = (
       ('Student','Student'),
       ('Corporate Staff','Corporate Staff'),
       ('Teacher','Teacher'),
       ('Others','Others'),
	   )

  username = models.ForeignKey(User, unique=True, related_name='profile')

  email    = models.EmailField(_("Email Address"),unique=True)
 
  category = models.CharField(max_length = 80, choices=PARTICIPANT_CATEGORY,)

  organisation = models.CharField(_("Organisation"),max_length=200,blank = True,null = True)

  attending_conf = models.BooleanField(verbose_name="Will you attend conference?")

  attending_tut = models.BooleanField(verbose_name="Will you attend tutorial session?")

  attending_sprint = models.BooleanField(verbose_name="Will you attend sprint?")

  paper_submission = models.BooleanField(verbose_name="Do you want to Submit paper?")