diff options
author | Mark Holmquist <marktraceur@gmail.com> | 2011-08-22 02:57:40 -0700 |
---|---|---|
committer | Mark Holmquist <marktraceur@gmail.com> | 2011-08-22 02:57:40 -0700 |
commit | 08750772eaf140266d1be0aac5024f581664012b (patch) | |
tree | 88064c0f18512de872d77804aceff7c387fb4de9 /mediagoblin/auth/views.py | |
parent | a8327519ebcb9ea7b3b8362cda989a130a5813d1 (diff) | |
download | mediagoblin-08750772eaf140266d1be0aac5024f581664012b.tar.lz mediagoblin-08750772eaf140266d1be0aac5024f581664012b.tar.xz mediagoblin-08750772eaf140266d1be0aac5024f581664012b.zip |
+ 'confirm' section for confirmation dialogues
+ implemented delete functionality
* fixed several instances of 'must be an instance of unicode, not str'
Diffstat (limited to 'mediagoblin/auth/views.py')
-rw-r--r-- | mediagoblin/auth/views.py | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/mediagoblin/auth/views.py b/mediagoblin/auth/views.py index 4c4a34fd..48c5937c 100644 --- a/mediagoblin/auth/views.py +++ b/mediagoblin/auth/views.py @@ -44,11 +44,12 @@ def register(request): if request.method == 'POST' and register_form.validate(): # TODO: Make sure the user doesn't exist already - + username = unicode(request.POST['username'].lower()) + email = unicode(request.POST['email'].lower()) users_with_username = request.db.User.find( - {'username': request.POST['username'].lower()}).count() + {'username': username}).count() users_with_email = request.db.User.find( - {'email': request.POST['email'].lower()}).count() + {'email': email}).count() extra_validation_passes = True @@ -64,8 +65,8 @@ def register(request): if extra_validation_passes: # Create the user user = request.db.User() - user['username'] = request.POST['username'].lower() - user['email'] = request.POST['email'].lower() + user['username'] = username + user['email'] = email user['pw_hash'] = auth_lib.bcrypt_gen_password_hash( request.POST['password']) user.save(validate=True) |