summaryrefslogtreecommitdiff
path: root/testapp/exam/forms.py
diff options
context:
space:
mode:
authorjayparikh1112012-02-16 12:51:32 +0530
committerjayparikh1112012-02-16 12:51:32 +0530
commitd18df85469fc993520ee397f4a28b422c550408a (patch)
tree18d46dfeaf9bc5454cac35a32ef20f8d3c58ac5b /testapp/exam/forms.py
parent8c548960349a01393141845d0ae1e728e9130b7c (diff)
downloadonline_test-d18df85469fc993520ee397f4a28b422c550408a.tar.gz
online_test-d18df85469fc993520ee397f4a28b422c550408a.tar.bz2
online_test-d18df85469fc993520ee397f4a28b422c550408a.zip
Form to Add New Quiz
Diffstat (limited to 'testapp/exam/forms.py')
-rw-r--r--testapp/exam/forms.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/testapp/exam/forms.py b/testapp/exam/forms.py
index d99a04d..a867f5f 100644
--- a/testapp/exam/forms.py
+++ b/testapp/exam/forms.py
@@ -5,7 +5,7 @@ from django.contrib.auth import authenticate
from django.contrib.auth.models import User
from string import letters, punctuation, digits
-
+import datetime
UNAME_CHARS = letters + "._" + digits
PWD_CHARS = letters + punctuation + digits
@@ -96,3 +96,10 @@ class UserLoginForm(forms.Form):
return user
+
+
+class QuizForm(forms.Form):
+ start_date = forms.DateField(initial=datetime.date.today)
+ duration = forms.IntegerField()
+ active = forms.BooleanField(required = False)
+ description = forms.CharField(max_length=256, widget=forms.Textarea(attrs={'cols':20,'rows':2}))