summaryrefslogtreecommitdiffstats
path: root/django_authopenid
diff options
context:
space:
mode:
authorEvgeny Fadeev <evgeny.fadeev@gmail.com>2010-03-25 16:23:31 -0400
committerEvgeny Fadeev <evgeny.fadeev@gmail.com>2010-03-25 16:23:31 -0400
commit2cc08493f2f41c8bd10192cdafba01bd5b85c1ae (patch)
treec0e826a44ae7ba439f532c13783d9a2e2e76131f /django_authopenid
parent65561d50def89910746d53ae58801ac6d4ba1a8a (diff)
downloadaskbot-2cc08493f2f41c8bd10192cdafba01bd5b85c1ae.tar.gz
askbot-2cc08493f2f41c8bd10192cdafba01bd5b85c1ae.tar.bz2
askbot-2cc08493f2f41c8bd10192cdafba01bd5b85c1ae.zip
initial commit
Diffstat (limited to 'django_authopenid')
-rwxr-xr-xdjango_authopenid/views.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/django_authopenid/views.py b/django_authopenid/views.py
index 7c7d9e07..3c794a0d 100755
--- a/django_authopenid/views.py
+++ b/django_authopenid/views.py
@@ -573,21 +573,28 @@ def signup(request):
email_feeds_form = SimpleEmailSubscribeForm(request.POST)
#validation outside if to remember form values
+ logging.debug('validating classic register form')
form1_is_valid = form.is_valid()
+ logging.debug('classic register form validated')
form2_is_valid = email_feeds_form.is_valid()
+ logging.debug('email feeds form validated')
if form1_is_valid and form2_is_valid:
+ logging.debug('both forms are valid')
next = form.cleaned_data['next']
username = form.cleaned_data['username']
password = form.cleaned_data['password1']
email = form.cleaned_data['email']
user_ = User.objects.create_user( username,email,password )
+ logging.debug('new user %s created' % username)
if settings.USE_EXTERNAL_LEGACY_LOGIN == True:
EXTERNAL_LOGIN_APP.api.create_user(username,email,password)
user_.backend = "django.contrib.auth.backends.ModelBackend"
login(request, user_)
+ logging.debug('new user logged in')
email_feeds_form.save(user_)
+ logging.debug('email feeds form saved')
# send email
subject = _("Welcome email subject line")
@@ -602,7 +609,7 @@ def signup(request):
message = message_template.render(message_context)
send_mail(subject, message, settings.DEFAULT_FROM_EMAIL,
[user_.email])
- logging.debug('new user with login and password created!')
+ logging.debug('new user with login and password created, confirmation email sent!')
return HttpResponseRedirect(next)
else:
logging.debug('create classic account forms were invalid')