added user management system

This commit is contained in:
Clemens-Dautermann 2018-12-18 18:24:41 +01:00
parent 0b31a83f83
commit 8e855e0748
16 changed files with 446 additions and 3 deletions

View file

@ -0,0 +1,15 @@
{% extends 'bases/navbar.html' %}
{% load static %}
{% block content %}
<div class="container">
<p>Logged out!</p>
<a href="{% url 'login'%}">Click here to login again.</a>
</div>
</body>
{% endblock %}
</html>

View file

@ -0,0 +1,50 @@
{% extends 'bases/navbar.html' %}
{% load static %}
{% block content %}
<html>
<div class="container">
{% if form.errors %}
<p class="error">Wrong username/password combination</p>
{% endif %}
{% if next %}
<p class="error">You cannot access that page without being logged in.</p>
{% endif %}
<form class="form-horizontal login-form" action="{% url 'login' %}" method="post">
{% csrf_token %}
<div class="form-group">
<label class="control-label col-sm-2" for="email">Username:</label>
<div class="col-sm-10">
{{ form.username }}
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-2" for="pwd">Password:</label>
<div class="col-sm-10">
{{ form.password }}
</div>
</div>
<div class="form-group">
<div class="col-sm-offset-2 col-sm-10">
<button type="submit" class="btn btn-default">Login</button>
<input type="hidden" name="next" value="{{ next }}">
<span class="reset"><a href="{% url 'password_reset' %}">Lost password?</a></span>
</div>
</div>
</form>
</div>
</body>
</html>
{% endblock %}

View file

@ -0,0 +1,25 @@
{% extends 'bases/navbar.html' %}
{% load static %}
{% block content %}
<html>
<div class="container">
<h1>registration page</h1>
<form method="post" action="{% url 'register' %}">
{% csrf_token %}
{% if form.errors %}
<p>There are errors in the form</p>
{% endif %}
{{ form }}
<input type="submit" value="Register">
</form>
<div>
</body>
</html>
{% endblock %}