diff options
author | Philip Sargent <philip.sargent@gmail.com> | 2025-02-09 14:16:30 +0000 |
---|---|---|
committer | Philip Sargent <philip.sargent@gmail.com> | 2025-02-09 14:16:30 +0000 |
commit | 60fcb831d1ab6baff03ed4695e4ec4b0d1181af7 (patch) | |
tree | 93bf989104b707d5c4ce3d48f1079bdfe46c5586 /core | |
parent | 441049b0f18fdd801b94ceeb613106d7b8ba4d8b (diff) | |
download | troggle-60fcb831d1ab6baff03ed4695e4ec4b0d1181af7.tar.gz troggle-60fcb831d1ab6baff03ed4695e4ec4b0d1181af7.tar.bz2 troggle-60fcb831d1ab6baff03ed4695e4ec4b0d1181af7.zip |
signup readonly, but visible
Diffstat (limited to 'core')
-rw-r--r-- | core/views/signup.py | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/core/views/signup.py b/core/views/signup.py index 16b59e3..04e7539 100644 --- a/core/views/signup.py +++ b/core/views/signup.py @@ -55,21 +55,30 @@ def signup(request): The user must be logged-on as a personal login and that is who is being signed up. You can't signup someone else. """ + form_read_only = True # default signup_user = request.user identified_login = is_identified_user(signup_user) if identified_login: editor = get_git_string(signup_user) + form_read_only = False else: - return HttpResponseRedirect("/accounts/login/") + get_cookie(request) # might be blank + # No, just make the form read-only. + # return HttpResponseRedirect("/accounts/login/") - people = Person.objects.filter(user=signup_user) - if len(people) == 1: - signup_person = people[0] + if signup_user.is_anonymous: + experience = 0 else: - return HttpResponseRedirect("/accounts/login") + people = Person.objects.filter(user=signup_user) + if len(people) == 1: + signup_person = people[0] + form_read_only = False + # else: + # No, just make the form read-only. + # return HttpResponseRedirect("/accounts/login") - experience = how_many_previous_expos(signup_person) + 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 |