diff options
author | hardythe1 | 2012-02-24 16:16:38 +0530 |
---|---|---|
committer | hardythe1 | 2012-02-24 16:16:38 +0530 |
commit | b1fbf5b02280de5b78b0249e777a179e34b50b98 (patch) | |
tree | f133bd5e556d4d0e8bbc94c9ffbac22bcc46bb31 /testapp/exam/forms.py | |
parent | dd3fd7b8c58d836baba24441e7d55c6d51858eab (diff) | |
download | online_test-b1fbf5b02280de5b78b0249e777a179e34b50b98.tar.gz online_test-b1fbf5b02280de5b78b0249e777a179e34b50b98.tar.bz2 online_test-b1fbf5b02280de5b78b0249e777a179e34b50b98.zip |
formating and identation
Diffstat (limited to 'testapp/exam/forms.py')
-rw-r--r-- | testapp/exam/forms.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/testapp/exam/forms.py b/testapp/exam/forms.py index 1788a08..e622b88 100644 --- a/testapp/exam/forms.py +++ b/testapp/exam/forms.py @@ -18,6 +18,7 @@ UNAME_CHARS = letters + "._" + digits PWD_CHARS = letters + punctuation + digits class UserRegisterForm(forms.Form): + """A Class to create new form for User's Registration. It has the various fields and functions required to register a new user to the system""" username = forms.CharField(max_length=30, help_text='Letters, digits, period and underscores only.') @@ -88,6 +89,8 @@ class UserRegisterForm(forms.Form): return u_name, pwd class UserLoginForm(forms.Form): + """Creates a form which will allow the user to log into the system.""" + username = forms.CharField(max_length = 30) password = forms.CharField(max_length=30, widget=forms.PasswordInput()) @@ -105,6 +108,8 @@ class UserLoginForm(forms.Form): return user class QuizForm(forms.Form): + """Creates a form to add or edit a Quiz. It has the related fields and functions required.""" + start_date = forms.DateField(initial=datetime.date.today) duration = forms.IntegerField() active = forms.BooleanField(required = False) @@ -124,6 +129,8 @@ class QuizForm(forms.Form): new_quiz.save() class QuestionForm(forms.Form): + """Creates a form to add or edit a Question. It has the related fields and functions required.""" + summary = forms.CharField(max_length = 128) description = forms.CharField(widget = forms.Textarea(attrs={'cols': 20, 'rows': 3})) points = forms.FloatField() |