diff options
Diffstat (limited to 'core/views/signup.py')
-rw-r--r-- | core/views/signup.py | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/core/views/signup.py b/core/views/signup.py index 1d10d3e..fdef549 100644 --- a/core/views/signup.py +++ b/core/views/signup.py @@ -21,7 +21,7 @@ from troggle.core.views.editor_helpers import HTMLarea from troggle.core.utils import ( add_commit, ) -from troggle.parsers.users import get_encryptor, ENCRYPTED_DIR +from troggle.parsers.users import get_encryptor, ENCRYPTED_DIR, how_many_previous_expos """The new user signup form and expo user management system in 2025. """ @@ -69,7 +69,8 @@ def signup(request): else: editor = f"troggle <signup_anon@austria.expo>" - + 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 if pageform.is_valid(): @@ -103,7 +104,7 @@ def signup(request): if personal_login: initial_context["name"] = signup_person.fullname initial_context["email"] = signup_user.email - + initial_context["experience"] = experience pageform = ExpoSignupForm(initial=initial_context) @@ -115,7 +116,7 @@ def signup(request): ) def read_signups(): - print(f" + READ signups") + # print(f" + READ signups") f = get_encryptor() signups_dir = settings.EXPOWEB / ENCRYPTED_DIR / current_expo() if not signups_dir.is_dir(): @@ -144,7 +145,7 @@ def read_signups(): signups_clear ={} for su, content in signups_dict.items(): clear_text = f.decrypt(content).decode() - print(f"\n - C signups_dict {su} - {clear_text}") + print(f"\n - {su} - {clear_text}") signups_clear[su] = json.loads(clear_text) return signups_clear @@ -238,4 +239,6 @@ class ExpoSignupForm(forms.Form): 'placeholder': 'Estuary english (fluent),\nCan use the potato hut bread machine (level 3 certificate)'}), required=False) aims = forms.CharField(widget=forms.Textarea(attrs={'rows': 3, 'cols': 80, 'tabindex': 23, 'placeholder': 'Strolling over the plateau, sunning myself and taking in the views.'}), required=False) + experience = forms.IntegerField(required=True, widget=forms.TextInput(attrs={'size': 1, 'tabindex': 24, 'readonly': 'readonly'})) + |