mirror of
https://expo.survex.com/repositories/troggle/.git
synced 2026-02-08 11:49:50 +00:00
user registration pages
This commit is contained in:
@@ -50,4 +50,6 @@ This is because Django is Opinionated and does lots of Invisible Defaults
|
||||
<p><input type="submit" value="Login →"></p>
|
||||
</form>
|
||||
</div>
|
||||
<hr><hr>
|
||||
{{form}}
|
||||
{% endblock %}
|
||||
|
||||
@@ -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
|
||||
|
||||
51
templates/login/register.html
Normal file
51
templates/login/register.html
Normal file
@@ -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 →">
|
||||
</div>
|
||||
</form>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
{% endblock %}
|
||||
@@ -33,10 +33,10 @@ This file is actually identical to troggle/templates/login/index.html
|
||||
<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>Have you <a href='/accounts/password_reset/'>forgotten your password - reset it</a>?<br/>
|
||||
Or perhaps <a href='/accounts/password_change/'>change your password</a>?</p>
|
||||
|
||||
<p>Neither of those links work yet, by the way, I'm only trying to *appear* helpful.
|
||||
<p>Neither of those links work properly yet, by the way, I'm only trying to *appear* helpful.
|
||||
|
||||
<div class='space'></div>
|
||||
{% endif %}
|
||||
@@ -51,5 +51,8 @@ This file is actually identical to troggle/templates/login/index.html
|
||||
<br/>
|
||||
<p><input type="submit" value="Login →"></p>
|
||||
</form>
|
||||
|
||||
<hr/>
|
||||
{{form}}
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
Reference in New Issue
Block a user