+ if request.method == 'POST' and form.validate():
+ user.url = unicode(request.POST['url'])
+ user.bio = unicode(request.POST['bio'])
+
+ user.save()
+
+ messages.add_message(request,
+ messages.SUCCESS,
+ _("Profile changes saved"))
+ return redirect(request,
+ 'mediagoblin.user_pages.user_home',
+ user=user['username'])
+
+ return render_to_response(
+ request,
+ 'mediagoblin/edit/edit_profile.html',
+ {'user': user,
+ 'form': form})
+
+
+@require_active_login
+def edit_account(request):
+ edit_username = request.GET.get('username')
+ user = request.user
+
+ form = forms.EditAccountForm(request.POST)
+