use "forname lastname" as default username, with a space

This commit is contained in:
Oskar Hahn 2012-07-10 02:50:42 +02:00
parent 96aca54f61
commit 85bddf6872

View File

@ -31,7 +31,7 @@ def gen_username(first_name, last_name):
"""
generates the username for new users.
"""
testname = "%s%s" % (first_name, last_name)
testname = "%s %s" % (first_name.strip(), last_name.strip())
try:
User.objects.get(username=testname)
except User.DoesNotExist: