upload/models.py
author Madhusudan.C.S <madhusudancs@gmail.com>
Thu, 03 Sep 2009 18:37:48 +0530
changeset 18 07408d1ced76
parent 17 08a47999f316
child 24 7bf724544c9b
permissions -rw-r--r--
Added CSS and I accept terms and condition.

from django.db import models

# Create your models here.

class Participant(models.Model):
	LANGUAGE_CHOICES = (
    ('Assamese', 'Assamese/Axomiya'),
    ('Bengali', 'Bengali'),
    ('Bodo', 'Bodo'),
    ('Dogri', 'Dogri'),
    ('English', 'English'),
    ('Gujarati', 'Gujarati'),
    ('Hindi', 'Hindi'),
    ('Kannada', 'Kannada'),
    ('Kashmiri', 'Kashmiri'),
    ('Konkani', 'Konkani'),
    ('Maithili', 'Maithili'),
    ('Malayalam', 'Malayalam'),
    ('Manipuri', 'Manipuri'),
    ('Marathi', 'Marathi'),
    ('Nepali', 'Nepali'),
    ('Oriya', 'Oriya'),
    ('Punjabi', 'Punjabi'),
    ('Sanskrit', 'Sanskrit'),
    ('Santali', 'Santali'),
    ('Sindhi', 'Sindhi'),
    ('Tamil', 'Tamil'),
    ('Telugu', 'Telugu'),
    ('Urdu', 'Urdu'),
    ('Other', 'Other')
    )

	CATEGORY_CHOICES = (
		('Student at IIT','Student at IIT'),
        ('Staff and family','Staff and family'),
        ('Faculty and family','Faculty and family'),
        ('Others','Others'),
	    )

	name = models.CharField(max_length = 50)
	email = models.EmailField()
	filename = models.FileField(upload_to='videos/%Y/%m/%d')
	language = models.CharField(max_length = 20, choices=LANGUAGE_CHOICES)
	other_lang = models.CharField(max_length = 256, 
															  verbose_name='If Others, specify',
															  blank=True, null=True)
	phonenumber = models.CharField(max_length=15)
	age = models.IntegerField(max_length=3)
	category = models.CharField(max_length = 80, choices=CATEGORY_CHOICES)