Mercurial > agora
diff templates/controls.djhtml @ 23:d9658d30b814
Implement initial user registration and authentication. Still way buggy.
author | Jordi Gutiérrez Hermoso <jordigh@gmail.com> |
---|---|
date | Sun, 27 Jun 2010 21:56:57 -0500 |
parents | 8059d39dc6ef |
children | 2e7226e90157 |
line wrap: on
line diff
--- a/templates/controls.djhtml Sun Jun 27 16:21:58 2010 +0200 +++ b/templates/controls.djhtml Sun Jun 27 21:56:57 2010 -0500 @@ -1,9 +1,30 @@ {% extends "base.djhtml" %} {% block content-related %} -<div class="whitebox"> - <p> - stuff stuff stuff - </p> +<div id="info"> + <h3> + Controls + </h3> + <div class="whitebox"> + {% if user.is_authenticated %} + <p> + You are logged in + as <a href="/{{user.username}}">{{user.username}}</a>. + </p> + <p> + (<a href="{% url auth_logout %}">logout</a>) + </p> + {% else %} + <p> + <a href="/accounts/login">Log in</a> + </p> + {% endif %} + <form method="get" action="." > + <br/> + <input id="search" type="text" name="search" maxlength="200" size="10"/> + <input type="submit" value="Search" /> + </form> + + </div> </div> {% endblock %}