From c976fee2d938d91af088ddaecefa8ce6e4d17afe Mon Sep 17 00:00:00 2001 From: Jane Manning Date: Tue, 28 May 2013 14:09:58 -0700 Subject: [PATCH] Copy changes to make dup email or public-username messages more informative --- common/djangoapps/student/views.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/djangoapps/student/views.py b/common/djangoapps/student/views.py index 8059026e12..463ad33316 100644 --- a/common/djangoapps/student/views.py +++ b/common/djangoapps/student/views.py @@ -527,12 +527,12 @@ def _do_create_account(post_vars): js = {'success': False} # Figure out the cause of the integrity error 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' return HttpResponse(json.dumps(js)) 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' return HttpResponse(json.dumps(js))