summaryrefslogtreecommitdiff
path: root/exam
diff options
context:
space:
mode:
authorPrabhu Ramachandran2011-11-21 10:20:22 +0530
committerPrabhu Ramachandran2011-11-21 10:20:22 +0530
commit99b4b2c5b6e70d1c721c68b5ce911a5c79b30df4 (patch)
treed0d8a629a5b0917bf21d26ac03d58c613314914e /exam
parent587fb65d126f5c12fd735dceca4420871239e52d (diff)
downloadonline_test-99b4b2c5b6e70d1c721c68b5ce911a5c79b30df4.tar.gz
online_test-99b4b2c5b6e70d1c721c68b5ce911a5c79b30df4.tar.bz2
online_test-99b4b2c5b6e70d1c721c68b5ce911a5c79b30df4.zip
BUG: usernames are case sensitive.
The form checking code was assuming that usernames are case insensitive but this is not the case hence we now check for exact matches in the username. This prevented users who registered with an upper case username sometimes.
Diffstat (limited to 'exam')
-rw-r--r--exam/forms.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/exam/forms.py b/exam/forms.py
index 0ae9d65..cb2d37d 100644
--- a/exam/forms.py
+++ b/exam/forms.py
@@ -28,7 +28,7 @@ class UserRegisterForm(forms.Form):
raise forms.ValidationError(msg)
try:
- User.objects.get(username__iexact = u_name)
+ User.objects.get(username__exact = u_name)
raise forms.ValidationError("Username already exists.")
except User.DoesNotExist:
return u_name