diff options
author | jayparikh111 | 2012-02-01 10:33:57 +0530 |
---|---|---|
committer | jayparikh111 | 2012-02-01 10:33:57 +0530 |
commit | 8f829495ea4a74e3e777cd1f4214781b9c63776b (patch) | |
tree | 4f0ad4693ea8c8d655f8bcda044781535e43334b | |
parent | 20346cca57a525c155fdd7f18253689c68645efd (diff) | |
parent | 5aa7fb163af95c27bb3aea4a1dee75ef406e0582 (diff) | |
download | online_test-8f829495ea4a74e3e777cd1f4214781b9c63776b.tar.gz online_test-8f829495ea4a74e3e777cd1f4214781b9c63776b.tar.bz2 online_test-8f829495ea4a74e3e777cd1f4214781b9c63776b.zip |
Merge branch 'visual_changes' of github.com:hardythe1/online_test into visual_changes
-rw-r--r-- | testapp/exam/forms.py | 7 | ||||
-rw-r--r-- | testapp/templates/exam/intro.html | 29 |
2 files changed, 30 insertions, 6 deletions
diff --git a/testapp/exam/forms.py b/testapp/exam/forms.py index a5ca26f..d99a04d 100644 --- a/testapp/exam/forms.py +++ b/testapp/exam/forms.py @@ -85,8 +85,11 @@ class UserLoginForm(forms.Form): def clean(self): super(UserLoginForm, self).clean() - u_name, pwd = self.cleaned_data["username"], self.cleaned_data["password"] - user = authenticate(username = u_name, password = pwd) + try: + u_name, pwd = self.cleaned_data["username"], self.cleaned_data["password"] + user = authenticate(username = u_name, password = pwd) + except Exception: + raise forms.ValidationError("Username and/or Password is not entered") if not user: raise forms.ValidationError("Invalid username/password") diff --git a/testapp/templates/exam/intro.html b/testapp/templates/exam/intro.html index 1d3e5de..2306fb7 100644 --- a/testapp/templates/exam/intro.html +++ b/testapp/templates/exam/intro.html @@ -3,7 +3,16 @@ {% block title %}Instructions and Rules {% endblock %} {% block content %} -<h2>Important rules and instructions</h2> +<html lang="en"> + <body> + <div class="container"> + <div class="content"> +<div class="page-header"> +<h1><Strong><center>Online Test</center></strong></h1> +</div> + <div class=row> + <div class=span14> +<h3><center>Important instructions & rules</center></h3><br> <p> Welcome <strong>{{user.first_name.title}} {{user.last_name.title}}</strong>, to the programming quiz! </p> @@ -43,11 +52,23 @@ carefully. </ul> -<p> We hope you enjoy taking this exam.</p> +<p> We hope you enjoy taking this exam !!!</p> <form action="{{URL_ROOT}}/exam/start/" method="post" align="center"> {% csrf_token %} -<input type="submit" name="start" value="Start Exam!"> +<center><button class="btn" type="submit" name="start">Start Exam!</button></center> +<!--input type="submit" name="start" value="Start Exam!"--> </form> +</div> + </div> + </div> +<footer> + <p>© FOSSEE group, IIT Bombay</p> + </footer> -{% endblock content %}
\ No newline at end of file + </div> <!-- /container --> + + </body> +</html> + +{% endblock content %} |