From 9f94c33228caeeb864a44242431f29c24bd29c06 Mon Sep 17 00:00:00 2001 From: Johan Lundberg Date: Tue, 10 May 2011 12:43:56 +0200 Subject: Minor fixes. --- templates/changepw/index.html | 15 ++++++--------- views.py | 2 +- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/templates/changepw/index.html b/templates/changepw/index.html index bd607ef..55badd8 100644 --- a/templates/changepw/index.html +++ b/templates/changepw/index.html @@ -11,18 +11,15 @@ - - - - +
Your usernames
Username:{{ username }}Username:{{ username }}
-

Available actions:

- +

+ Available actions: + Change password + Reset password +

Log out

{% endblock %} diff --git a/views.py b/views.py index 6b43181..564a3f8 100644 --- a/views.py +++ b/views.py @@ -52,6 +52,7 @@ def change_password(request): changing script will be run with the username and new password. The function that changes the password has to be provided as func. ''' + username = _get_username(request) if request.method == 'POST': form = ChangePasswordForm(request.POST) if form.is_valid(): @@ -62,7 +63,6 @@ def change_password(request): context_instance=RequestContext(request)) else: form = ChangePasswordForm() - username = _get_username(request) return render_to_response('changepw/change_password.html', {'form': form, 'username': username}, context_instance=RequestContext(request)) -- cgit v1.1