2
0
mirror of https://expo.survex.com/repositories/troggle/.git synced 2026-02-26 03:25:20 +00:00

WORKING Dj2.2.24 & 2.2.25 py3.7

This commit is contained in:
Philip Sargent
2022-03-02 21:15:24 +00:00
parent af50d4912d
commit 601fc2cffc
12 changed files with 97 additions and 29 deletions

View File

@@ -27,7 +27,7 @@ This is because Django is Opinionated and does lots of Invisible Defaults
<div class='align-center'>
<div class='space'></div>
<div class='align-center'>
<form action="/login/" method="post" accept-charset="utf-8">{% csrf_token %}
<form action="/accounts/login/" method="post" accept-charset="utf-8">{% csrf_token %}
<table class='form'>
{{form.as_table}}
</table>

View File

@@ -0,0 +1,55 @@
{% extends 'base.html' %}
{% block content %}
<!-- To understand how this all works, with invisible default behaviour, see
troggle/templates/login/logout.html
troggle/templates/registration/
because magic
This is because Django is Opinionated and does lots of Invisible Defaults
This file is actually identical to troggle/templates/login/index.html
-->
<div class='middle'>
<h2>Troggle user login</h2>
</div>
{% if message %}
<div style='width: 350px;' class='middle3 login'>
{% if title %}
<div class='align-center'>
<h3>{{title}}</h3>
<div class='space'></div>
{% endif %}
<p>{{message }}</p>
</div>
{% endif %}
<h3>Troggle ordinary user login - no access to Django control panel</h3>
<p>(This is using template registration/login.html)
<div style='width: 250px;' class='middle3 login'>
<div class='align-center'>
<div class='space'></div>
{% if invalid %}
<p class='error'>The username and password you provided don't match. Please try again.</p>
<p>Have you <a href='/accounts/forgottenpassword/'>forgotten your password</a>?<br/>
Or perhaps <a href='/accounts/forgottenusername/'>your username</a>?</p>
<p>Neither of those links work yet, by the way, I'm only trying to *appear* helpful.
<div class='space'></div>
{% endif %}
<div class='align-center'>
<form action="" method="post" accept-charset="utf-8">{% csrf_token %}
<table class='form'>
<tr><th><label for="id_username">Username:</label></th><td><input id="id_username" type="text" name="username" maxlength="30" /></td></tr>
<tr><th><label for="id_password">Password:</label></th><td><input type="password" name="password" id="id_password" /></td></tr>
</table>
<div class='space'></div>
<br/>
<p><input type="submit" value="Login &rarr;"></p>
</form>
</div>
{% endblock %}