login form v1

This commit is contained in:
James Turk 2012-05-29 00:25:08 -04:00
parent f6f7c19569
commit aa1fe6ce38
2 changed files with 27 additions and 2 deletions

View File

@ -63,8 +63,7 @@ ROOT_URLCONF = 'fowl.urls'
WSGI_APPLICATION = 'fowl.wsgi.application'
TEMPLATE_DIRS = (
# Always use forward slashes, even on Windows.
# Don't forget to use absolute paths, not relative paths.
os.path.join(os.path.dirname(__file__), 'templates'),
)
INSTALLED_APPS = (

View File

@ -0,0 +1,26 @@
{% extends "base.html" %}
{% block content %}
{% if form.errors %}
<p>Your username and password didn't match. Please try again.</p>
{% endif %}
<form method="post" action=".">
{% csrf_token %}
<table>
<tr>
<td>{{ form.username.label_tag }}</td>
<td>{{ form.username }}</td>
</tr>
<tr>
<td>{{ form.password.label_tag }}</td>
<td>{{ form.password }}</td>
</tr>
</table>
<input type="submit" value="login" />
<input type="hidden" name="next" value="{{ next }}" />
</form>
{% endblock %}