Commit c976fee2 by Jane Manning

Copy changes to make dup email or public-username messages more informative

parent 2efa160c
...@@ -527,12 +527,12 @@ def _do_create_account(post_vars): ...@@ -527,12 +527,12 @@ def _do_create_account(post_vars):
js = {'success': False} js = {'success': False}
# Figure out the cause of the integrity error # Figure out the cause of the integrity error
if len(User.objects.filter(username=post_vars['username'])) > 0: if len(User.objects.filter(username=post_vars['username'])) > 0:
js['value'] = "An account with this username already exists." js['value'] = "An account with the Public Username '" + post_vars['username'] + "' already exists."
js['field'] = 'username' js['field'] = 'username'
return HttpResponse(json.dumps(js)) return HttpResponse(json.dumps(js))
if len(User.objects.filter(email=post_vars['email'])) > 0: if len(User.objects.filter(email=post_vars['email'])) > 0:
js['value'] = "An account with this e-mail already exists." js['value'] = "An account with the Email '" + post_vars['email'] + "' already exists."
js['field'] = 'email' js['field'] = 'email'
return HttpResponse(json.dumps(js)) return HttpResponse(json.dumps(js))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment