Skip to content

Instantly share code, notes, and snippets.

@particledecay
Created February 14, 2013 20:32
Show Gist options
  • Save particledecay/cad381571b58e6d74082 to your computer and use it in GitHub Desktop.
Save particledecay/cad381571b58e6d74082 to your computer and use it in GitHub Desktop.
[Django] [HTML] Basic login form (for a custom user model, hence the 'type="email"' validation input), updated for Django 1.5.
{% extends 'base.html' %}
{% block content %}
<div id="login-container" class="container-fluid">
<form action="{% url "users_login" %}" id="login-form" method="post" class="ka-form">
{% csrf_token %}
<p>
{{ form.username.label }}
<input type="email" id="{{ form.username.auto_id }}" name="username">
</p>
<p>
{{ form.password.label }}
{{ form.password }}
</p>
<input type="submit" class="btn btn-primary" value="Login">
</form>
</div>
<script type="text/javascript" src="{{ STATIC_URL }}js/users.login.js"></script>
{% endblock content %}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment