summaryrefslogtreecommitdiffstats
path: root/templates/login
diff options
context:
space:
mode:
authorPhilip Sargent <philip.sargent@gmail.com>2025-01-20 20:43:21 +0000
committerPhilip Sargent <philip.sargent@gmail.com>2025-01-20 20:43:21 +0000
commit8d8bc47e79fa3883a2a6404f7fc83b5a46829cd4 (patch)
tree993d3a3cb585cba584450a414488c1fd50641cc7 /templates/login
parent650cee4b0eadebb648e50057931ae78edc2f2a62 (diff)
downloadtroggle-8d8bc47e79fa3883a2a6404f7fc83b5a46829cd4.tar.gz
troggle-8d8bc47e79fa3883a2a6404f7fc83b5a46829cd4.tar.bz2
troggle-8d8bc47e79fa3883a2a6404f7fc83b5a46829cd4.zip
user registration pages
Diffstat (limited to 'templates/login')
-rw-r--r--templates/login/index.html2
-rw-r--r--templates/login/logout.html2
-rw-r--r--templates/login/register.html51
3 files changed, 54 insertions, 1 deletions
diff --git a/templates/login/index.html b/templates/login/index.html
index 6db786e..889149d 100644
--- a/templates/login/index.html
+++ b/templates/login/index.html
@@ -50,4 +50,6 @@ This is because Django is Opinionated and does lots of Invisible Defaults
<p><input type="submit" value="Login &rarr;"></p>
</form>
</div>
+<hr><hr>
+{{form}}
{% endblock %}
diff --git a/templates/login/logout.html b/templates/login/logout.html
index ccbc200..6bbe65b 100644
--- a/templates/login/logout.html
+++ b/templates/login/logout.html
@@ -10,7 +10,7 @@ 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
+This one is for logging out of the normal system whereas this one is for troggle
Not forgetting the template in
troggle/templates/login/index
diff --git a/templates/login/register.html b/templates/login/register.html
new file mode 100644
index 0000000..9c1527f
--- /dev/null
+++ b/templates/login/register.html
@@ -0,0 +1,51 @@
+{% extends 'base.html' %}
+
+{% block content %}
+<!-- this overrides the django.contrib.auth default form
+and it must be placed in
+troggle/templates/login/register.html
+because magic
+
+This is because Django is Opinionated and does lots of Invisible Defaults
+see
+https://docs.djangoproject.com/en/5.0/topics/auth/customizing/#using-a-custom-user-model-when-starting-a-project
+-->
+<script>
+function myFunction() {
+ var x = document.getElementById("id_password1");
+ if (x.type === "password") {
+ x.type = "text";
+ } else {
+ x.type = "password";
+ }
+ var x = document.getElementById("id_password2");
+ if (x.type === "password") {
+ x.type = "text";
+ } else {
+ x.type = "password";
+ }
+}
+</script>
+<div class='middle'>
+<h2>User registration - for a personal login to Troggle</h2>
+</div>
+<h3>Register a password and your email</h3>
+<!--using template login/register.html -->
+<p>For previous expoers, your username must be your id as listed on the <a href='/people'>past expoers list</a>
+<div style='width: 40%' align="right">
+ <form method="post" accept-charset="utf-8">{% csrf_token %}
+ {{form.as_p}}
+
+<div class='align-right'>
+ <input type="checkbox" checked name="visible" onclick="myFunction()">Make Passwords visible
+
+<br /><br /><input type="submit" value="Register &rarr;">
+</div>
+</form>
+
+
+
+
+
+
+{% endblock %}