upload/models.py
changeset 12 0a2b4e85a4ab
parent 2 4d2bbb2f3c4e
child 13 b0175fed9d20
--- a/upload/models.py	Wed Sep 02 21:08:39 2009 +0530
+++ b/upload/models.py	Wed Sep 02 23:25:20 2009 +0530
@@ -3,39 +3,41 @@
 # Create your models here.
 
 class Participant(models.Model):
-	LANGUAGE_CHOICES = (
-		(1,'Assamese/Axomiya'),
-		(2,'Bengali'),
-		(3,'Bodo'),
-		(4,'Dogri'),
-		(5,'Gujarati'),
-		(6,'Hindi'),
-		(7,'Kannada'),
-		(8,'Kashmiri'),
-		(9,'Konkani'),
-		(10,'Maithili'),
-		(11,'Malayalam'),
-		(12,'Manipuri'),
-		(13,'Marathi'),
-		(14,'Nepali'),
-		(15,'Oriya'),
-		(16,'Punjabi'),
-		(17,'Sanskrit'),
-		(18,'Santali'),
-		(19,'Sindhi'),
-		(20,'Tamil'),
-		(21,'Telugu'),
-		(22,'Urdu'),
-   	)
-   	CATEGORY_CHOICES = (
-		(1,'Student at IIT'),
-		(2,'Staff and family'),
-		(3,'Faculty and family'),
-		(4,'Others'),
-   	)
+	LANGUAGE_CHOICES = [
+('Assamese', 'Assamese/Axomiya'),
+('Bengali', 'Bengali'),
+('Bodo', 'Bodo'),
+('Dogri', 'Dogri'),
+('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'),
+]
+
+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')
+	filename = models.FileField(upload_to='videos/%Y/%m/%d')
 	language = models.CharField(max_length = 20, choices=LANGUAGE_CHOICES)
 	phonenumber = models.CharField(max_length=15)
 	age = models.IntegerField(max_length=3)