removed the required=True and added blank=True where it is required in models.py
authornishanth
Sat, 29 May 2010 09:41:26 +0530
changeset 6 3b3c5f11af8e
parent 5 6c4b3796a608
child 7 98f2b5c2abc9
removed the required=True and added blank=True where it is required in models.py
sdi/models.py
--- a/sdi/models.py	Sat May 29 09:36:16 2010 +0530
+++ b/sdi/models.py	Sat May 29 09:41:26 2010 +0530
@@ -29,23 +29,24 @@
     """ A model to hold the details of registered users.
     """
 
-    first_name = models.CharField(max_length=30, required=True)
-    last_name =  models.CharField(max_length=30, required=True)
-    email = models.EmailField(required=True)
-    gender = models.CharField(max_length=1, required=True, choices=GENDER_CHOICES)
+    first_name = models.CharField(max_length=30)
+    last_name =  models.CharField(max_length=30)
+    email = models.EmailField()
+    gender = models.CharField(max_length=1, choices=GENDER_CHOICES)
+
+    profession = models.CharField(max_length=20)
+    affiliated_to = models.CharField(max_length=30)
 
-    profession = models.CharField(max_length=20, required=True)
-    affiliated_to = models.CharField(max_length=30, required=True)
+    topics_interested = models.CharField(max_length=30)
 
-    topics_interested = models.TextField()
-    knowledge_of_python = models.CharField(max_length=1, required=True, choices=PYTHON_KNOWLEDGE_CHOICES)
-    need_for_python_workshop = models.BooleanField(verbose_name="Do you need a workshop on Python before you attend Sage Days", 
-                                                   required=True)
-    knowledge_of_sage = models.CharField(max_length=1, required=True, choices=SAGE_KNOWLEDGE_CHOICES)
-    tools_used = models.TextField(help_text="Ex: Scilab, Mathematica, Matlab etc.", verbose_name="Other tools used")
+    knowledge_of_python = models.CharField(max_length=1, choices=PYTHON_KNOWLEDGE_CHOICES)
+    need_for_python_workshop = models.BooleanField(verbose_name="Do you need a workshop on Python before you attend Sage Days")
+
+    knowledge_of_sage = models.CharField(max_length=1, choices=SAGE_KNOWLEDGE_CHOICES)
+    tools_used = models.TextField(help_text="Ex: Scilab, Mathematica, Matlab etc.", verbose_name="Other tools used", blank=True)
 
     address = models.TextField(help_text="To send DVD containing tutorials on Python if required.")
-    phone_num = models.CharField(max_length=15, required=True)
+    phone_num = models.CharField(max_length=15)
 
-    likeliness_of_attending = models.CharField(max_length=1, required=True, choices=LIKELINESS_CHOICES)
+    likeliness_of_attending = models.CharField(max_length=1, choices=LIKELINESS_CHOICES)