From a950cc60d9400c553b853f3a3308edaa8ea645cc Mon Sep 17 00:00:00 2001 From: Philip Sargent Date: Wed, 19 Feb 2025 16:00:53 +0200 Subject: tidy trailing slash everywhere & fix tests --- core/views/signup.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'core/views/signup.py') 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 -- cgit v1.2.3