added authentication

This commit is contained in:
2015-06-19 15:09:50 +01:00
parent e6791bf41a
commit 16c74cebe9
11 changed files with 74 additions and 11 deletions

View File

@@ -0,0 +1,20 @@
{% extends "base.html" %}
{% block title %}CBreader Login{% endblock %}
{% block content %}
<div class="col-md-4 col-md-offset-4">
{% if error %}
<div class="alert alert-danger" role="alert"><p>Your username and password didn't match. Please try again.</p></div>
{% endif %}
<form method="post" class="form-signin">
{% csrf_token %}
<h2 class="form-signin-heading">Please sign in</h2>
<label for="inputUser" class="sr-only">Username</label>
<input type="text" name="user" id="inputUser" class="form-control" placeholder="Username" required autofocus>
<label for="inputPassword" class="sr-only">Password</label>
<input type="password" name="password" id="inputPassword" class="form-control" placeholder="Password" required>
<button class="btn btn-lg btn-primary btn-block" type="submit">Sign in</button>
</form>
</div>
{% endblock %}