* Show the currently logged in user and a logout link on the login page.
authorMatthijs Kooijman <matthijs@stdin.nl>
Wed, 23 Jan 2008 12:45:56 +0000 (13:45 +0100)
committerMatthijs Kooijman <matthijs@stdin.nl>
Wed, 23 Jan 2008 12:45:56 +0000 (13:45 +0100)
templates/base/login.html

index 834dac48765df80991081c7af898663f5dfeb20a..07bfd33356f4fbc4034cbaac1cc0710d3283f550 100644 (file)
@@ -6,6 +6,11 @@
 <p>Your username and password didn't match. Please try again.</p>
 {% endif %}
 
+{% if user.is_authenticated %}
+       <p>You are currently logged in as {{ user.username }}</p>
+       <p><a href="../logout/">Logout</a></p>
+{% endif %}
+
 <form method="post" action=".">
 <table>
 <tr><td><label for="id_username">Username:</label></td><td>{{ form.username }}</td></tr>
@@ -14,6 +19,7 @@
 
 <input type="submit" value="login" />
 <input type="hidden" name="next" value="{{ next }}" />
+
 </form>
 
 {% endblock %}