@wraps(controller)
def new_controller_func(request, *args, **kwargs):
if request.user and \
- request.user.get('status') == u'needs_email_verification':
+ request.user.status == u'needs_email_verification':
return redirect(
request, 'mediagoblin.user_pages.user_home',
user=request.user.username)
- elif not request.user or request.user.get('status') != u'active':
+ elif not request.user or request.user.status != u'active':
next_url = urljoin(
request.urlgen('mediagoblin.auth.login',
qualified=True),
user = url_user
form = forms.EditProfileForm(request.form,
- url=user.get('url'),
- bio=user.get('bio'))
+ url=user.url,
+ bio=user.bio)
if request.method == 'POST' and form.validate():
user.url = unicode(request.form['url'])
def edit_account(request):
user = request.user
form = forms.EditAccountForm(request.form,
- wants_comment_notification=user.get('wants_comment_notification'),
- license_preference=user.get('license_preference'))
+ wants_comment_notification=user.wants_comment_notification,
+ license_preference=user.license_preference)
if request.method == 'POST':
form_validated = form.validate()
First view for submitting a file.
"""
submit_form = submit_forms.SubmitStartForm(request.form,
- license=request.user.get('license_preference'))
+ license=request.user.license_preference)
if request.method == 'POST' and submit_form.validate():
if not ('file' in request.files