New user login/logoff system using standard Dj

This commit is contained in:
Philip Sargent
2021-04-06 00:49:09 +01:00
parent 6d6bec35f2
commit d1cd72c5f8
25 changed files with 348 additions and 197 deletions

View File

@@ -0,0 +1,51 @@
{% extends 'base.html' %}
{% block content %}
<!-- this overrides the django.contrib.auth default logout form
and it must be placed in
troggle/templates/login/logout.html
because magic
Note that we need to have TWO DIFFERENT logout templates to make this work,
the other one is in
troggle/templates/registration/
That one is for logging out of the Django Admin system.
This one is for logging out of the normal system whereas this one
Not forgetting the template in
troggle/templates/login/index
which also has a login form.
This is because Django is Opinionated and does lots of Invisible Defaults
-->
<div class='middle'>
<h2>You have been logged out</h2>
</div>
<h3>Troggle ordinary user login - no access to Django control panel</h3>
<p>(using template login/logout.html)
<div style='width: 250px;' class='middle3 login'>
<div class='align-center'>
<div class='space'></div>
<div class='align-center'>
<form action="/login/" method="post" accept-charset="utf-8">{% csrf_token %}
<table class='form'>
{{form.as_table}}
</table>
<div class='space'></div>
<span class='indent'>
<br /><input type="submit" value="Login &rarr;">
</form>
</div>
</form>
</div>
</div>
{% endblock %}