Mercurial > agora
diff templates/registration/login.html @ 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 | |
children | 2e7226e90157 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/templates/registration/login.html Sun Jun 27 21:56:57 2010 -0500 @@ -0,0 +1,50 @@ +{% extends "controls.djhtml" %} + +{% block content %} +<div id="info"> + <h3> + Login + </h3> + <div class="whitebox"> + {% if user.is_authenticated %} + <p> + You're already logged in as + <a href="{{ user.username }}">{{user.username}}</a>. + </p> + <p> + (<a href="{% url auth_logout %}">logout</a>) + </p> + + {% else %} + + {% if form.errors %} + <p>{{form.errors}}</p> + {% endif %} + <form method="post" action="."> + {% csrf_token %} + <p> + <label for="id_username">Username:</label> + <br/> + <input id="id_username" type="text" name="username" maxlength="30" /> + </p> + <p> + <label for="id_password">Password:</label> + <br/> + <input type="password" name="password" id="id_password" /> + </p> + <input type="submit" value="Log in" /> + <input type="hidden" name="next" value="{{ next }}" /> + </form> + + <p> + Forgot password? <a href="{% url auth_password_reset %}">Reset it</a>! + </p> + <p> + Not member? <a href="{% url registration_register %}">Register</a>! + </p> + {% endif %} + + + </div> +</div> +{% endblock %}