diff options
author | Johan Lundberg <lundberg@nordu.net> | 2011-05-10 12:43:56 +0200 |
---|---|---|
committer | Johan Lundberg <lundberg@nordu.net> | 2011-05-10 12:43:56 +0200 |
commit | 9f94c33228caeeb864a44242431f29c24bd29c06 (patch) | |
tree | d5a632afe74b18803abf353822b55a886454e066 | |
parent | 55937de7c6eb9c4f631bc27f4417d77009aab98d (diff) |
Minor fixes.
-rw-r--r-- | templates/changepw/index.html | 15 | ||||
-rw-r--r-- | 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 @@ <table> <tr> - <th>Your usernames</th> - </tr> - <tr> - <td>Username:</td><td>{{ username }}</td> + <th>Username:</th><td>{{ username }}</td> </tr> </table> -<p>Available actions:</p> -<ul> - <li><a href="{% url changepw %}">Change password.</a></li> - <li><a href="{% url resetpw %}">Reset password.</a></li> -</ul> +<p> + Available actions: + <a href="{% url changepw %}">Change password</a> + <a href="{% url resetpw %}">Reset password</a> +</p> <p><a href="{% url logout %}">Log out</a></p> {% endblock %} @@ -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)) |