summaryrefslogtreecommitdiffstats
path: root/core/views/signup.py
diff options
context:
space:
mode:
authorPhilip Sargent <philip.sargent@gmail.com>2025-02-19 16:00:53 +0200
committerPhilip Sargent <philip.sargent@gmail.com>2025-02-19 16:00:53 +0200
commita950cc60d9400c553b853f3a3308edaa8ea645cc (patch)
tree2d9ba95d09d74355fc329b4e3bd093ea4ac30de8 /core/views/signup.py
parentcc06e2e1f4bdfbf354d79055595980a1bdef495c (diff)
downloadtroggle-a950cc60d9400c553b853f3a3308edaa8ea645cc.tar.gz
troggle-a950cc60d9400c553b853f3a3308edaa8ea645cc.tar.bz2
troggle-a950cc60d9400c553b853f3a3308edaa8ea645cc.zip
tidy trailing slash everywhere & fix tests
Diffstat (limited to 'core/views/signup.py')
-rw-r--r--core/views/signup.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/core/views/signup.py b/core/views/signup.py
index 7536556..bb85e03 100644
--- a/core/views/signup.py
+++ b/core/views/signup.py
@@ -23,7 +23,7 @@ from troggle.core.utils import (
write_and_commit,
)
from troggle.parsers.users import get_encryptor, ENCRYPTED_DIR, how_many_previous_expos
-
+from .auth import login_required_if_public
"""The new user signup form and expo user management system in 2025.
"""
@@ -50,7 +50,7 @@ def signupok(request):
{"year": SIGNUP_YEAR, "dates": SIGNUP_DATES, "signup_user": signup_user, "signedup_people": signedup_people},
)
-
+@login_required_if_public
def signup(request):
"""Displays and processes the applicant signup form for the forthcoming expo
The user must be logged-on as a personal login and that is
@@ -75,11 +75,12 @@ def signup(request):
if len(people) == 1:
signup_person = people[0]
form_read_only = False
- # else:
+ experience = how_many_previous_expos(signup_person)
+ else:
+ experience = 0
# No, just make the form read-only.
# return HttpResponseRedirect("/accounts/login")
- experience = how_many_previous_expos(signup_person)
if request.method == "POST": # If the form has been submitted...
pageform = ExpoSignupForm(request.POST) # A form bound to the POST data