From b1fbf5b02280de5b78b0249e777a179e34b50b98 Mon Sep 17 00:00:00 2001 From: hardythe1 Date: Fri, 24 Feb 2012 16:16:38 +0530 Subject: formating and identation --- testapp/exam/forms.py | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'testapp/exam/forms.py') 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() -- cgit