return redirect(request, 'mediagoblin.auth.login')
- if request.user["email_verified"]:
+ if request.user.email_verified:
messages.add_message(
request,
messages.ERROR,
title=media.title,
slug=media.slug,
description=media.description,
- tags=media_tags_as_string(media['tags']))
+ tags=media_tags_as_string(media.tags))
form = forms.EditForm(
request.POST,
user.url = unicode(request.POST['url'])
user.bio = unicode(request.POST['bio'])
- user.bio_html = cleaned_markdown_conversion(user['bio'])
+ user.bio_html = cleaned_markdown_conversion(user.bio)
user.save()
if request.method == 'POST' and form.validate():
password_matches = auth_lib.bcrypt_check_password(
request.POST['old_password'],
- user['pw_hash'])
+ user.pw_hash)
if (request.POST['old_password'] or request.POST['new_password']) and not \
password_matches:
'form': form})
if password_matches:
- user['pw_hash'] = auth_lib.bcrypt_gen_password_hash(
+ user.pw_hash = auth_lib.bcrypt_gen_password_hash(
request.POST['new_password'])
user.save()
_("Account settings saved"))
return redirect(request,
'mediagoblin.user_pages.user_home',
- user=user['username'])
+ user=user.username)
return render_to_response(
request,