From 5535bea44321d8ec19ff4ac334ebd1b6c0c2de5e Mon Sep 17 00:00:00 2001 From: carmen-chau Date: Sun, 8 Sep 2024 20:32:58 -0400 Subject: [PATCH 01/32] test changes --- hackathon_site/event/jinja2/event/landing.html | 3 ++- hackathon_site/registration/forms.py | 1 + .../jinja2/registration/application.html | 2 ++ .../0009_application_free_response_pronouns.py | 18 ++++++++++++++++++ hackathon_site/registration/models.py | 8 ++++++++ 5 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 hackathon_site/registration/migrations/0009_application_free_response_pronouns.py diff --git a/hackathon_site/event/jinja2/event/landing.html b/hackathon_site/event/jinja2/event/landing.html index 08b5e0fe..064841de 100644 --- a/hackathon_site/event/jinja2/event/landing.html +++ b/hackathon_site/event/jinja2/event/landing.html @@ -44,7 +44,8 @@
{% if request.user.is_authenticated %} - {% if application is none and is_application_open() %} +{# TODO: Temporary change, revert back to is_application_open()#} + {% if application is none and is_registration_open() %} Continue Application {% else %} Go to Dashboard diff --git a/hackathon_site/registration/forms.py b/hackathon_site/registration/forms.py index 0f28384e..1d466c4c 100644 --- a/hackathon_site/registration/forms.py +++ b/hackathon_site/registration/forms.py @@ -122,6 +122,7 @@ class Meta: fields = [ "age", "pronouns", + "free_response_pronouns", #TODO: New Section "ethnicity", "phone_number", "city", diff --git a/hackathon_site/registration/jinja2/registration/application.html b/hackathon_site/registration/jinja2/registration/application.html index f1df3acf..4806fdb9 100644 --- a/hackathon_site/registration/jinja2/registration/application.html +++ b/hackathon_site/registration/jinja2/registration/application.html @@ -38,6 +38,8 @@

Personal Information

{{ render_field(form.age, size="s12 m6 select2-wrapper") }} {{ render_field(form.phone_number, size="s12 m6") }} {{ render_field(form.pronouns, size="s12 m6 select2-wrapper") }} + {# TODO: New entry here#} + {{ render_field(form.free_response_pronouns, show_help_text_as_label=True, size="s12 m6 select2-wrapper") }} {{ render_field(form.ethnicity, size="s12 m6 select2-wrapper") }} {{ render_field(form.city, size="s12 m6 select2-wrapper added-country-margin formAddTopMargin") }} {{ render_field(form.country, size="s12 m6 select2-wrapper added-country-margin formAddTopMargin") }} diff --git a/hackathon_site/registration/migrations/0009_application_free_response_pronouns.py b/hackathon_site/registration/migrations/0009_application_free_response_pronouns.py new file mode 100644 index 00000000..b496e2a8 --- /dev/null +++ b/hackathon_site/registration/migrations/0009_application_free_response_pronouns.py @@ -0,0 +1,18 @@ +# Generated by Django 3.2.15 on 2024-09-08 20:35 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('registration', '0008_revert_0007_changes'), + ] + + operations = [ + migrations.AddField( + model_name='application', + name='free_response_pronouns', + field=models.CharField(default='', help_text="If you selected 'Other', please specify your pronouns.", max_length=20), + ), + ] diff --git a/hackathon_site/registration/models.py b/hackathon_site/registration/models.py index 46472007..193b669f 100644 --- a/hackathon_site/registration/models.py +++ b/hackathon_site/registration/models.py @@ -87,6 +87,14 @@ class Application(models.Model): pronouns = models.CharField( max_length=50, choices=PRONOUN_CHOICES, null=False, default="" ) + # TODO: New section here + free_response_pronouns = models.CharField( + max_length=20, + null=False, + default="", + help_text="If you selected 'Other', please specify your pronouns.", + ) + ethnicity = models.CharField(max_length=50, choices=ETHNICITY_CHOICES, null=False) phone_number = models.CharField( max_length=20, From dc21b8d5bcf45d15d6fe3bc77936d0170df6ae0c Mon Sep 17 00:00:00 2001 From: carmen-chau Date: Wed, 11 Sep 2024 00:30:27 -0400 Subject: [PATCH 02/32] deleted migration file --- .../0009_application_free_response_pronouns.py | 18 ------------------ 1 file changed, 18 deletions(-) delete mode 100644 hackathon_site/registration/migrations/0009_application_free_response_pronouns.py diff --git a/hackathon_site/registration/migrations/0009_application_free_response_pronouns.py b/hackathon_site/registration/migrations/0009_application_free_response_pronouns.py deleted file mode 100644 index b496e2a8..00000000 --- a/hackathon_site/registration/migrations/0009_application_free_response_pronouns.py +++ /dev/null @@ -1,18 +0,0 @@ -# Generated by Django 3.2.15 on 2024-09-08 20:35 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('registration', '0008_revert_0007_changes'), - ] - - operations = [ - migrations.AddField( - model_name='application', - name='free_response_pronouns', - field=models.CharField(default='', help_text="If you selected 'Other', please specify your pronouns.", max_length=20), - ), - ] From 1e9cd60c920fd8bcfc415fe1e93eaced9fc8f77b Mon Sep 17 00:00:00 2001 From: carmen-chau Date: Wed, 11 Sep 2024 01:03:11 -0400 Subject: [PATCH 03/32] added new pronoun choices, reformatted error checking --- hackathon_site/registration/forms.py | 14 +++++++++++ .../migrations/0009_auto_20240911_0043.py | 23 +++++++++++++++++++ hackathon_site/registration/models.py | 8 +++++-- 3 files changed, 43 insertions(+), 2 deletions(-) create mode 100644 hackathon_site/registration/migrations/0009_auto_20240911_0043.py diff --git a/hackathon_site/registration/forms.py b/hackathon_site/registration/forms.py index 1d466c4c..59d34f64 100644 --- a/hackathon_site/registration/forms.py +++ b/hackathon_site/registration/forms.py @@ -193,6 +193,10 @@ def clean(self): raise forms.ValidationError( _("User has already submitted an application."), code="invalid" ) + # TODO: New line + self.handle_free_response_pronouns() + # TODO: New line (calling an existing method that was never called.... for some reason?) + self.clean_age() return cleaned_data def clean_age(self): @@ -207,6 +211,16 @@ def clean_age(self): ) return user_age + # TODO: Wrote a new validator for the field "free_response_pronouns" + def handle_free_response_pronouns(self): + user_pronouns = self.cleaned_data["pronouns"] + user_free_response_pronouns = self.cleaned_data["free_response_pronouns"] + if user_pronouns == "other" and not user_free_response_pronouns: + raise forms.ValidationError( + _("Since you've selected 'Other' for pronouns, please state what pronouns you go by. Limit: 100 characters."), + code = 'free_response_pronouns', + ) + def save(self, commit=True): self.instance = super().save(commit=False) team = Team.objects.create() diff --git a/hackathon_site/registration/migrations/0009_auto_20240911_0043.py b/hackathon_site/registration/migrations/0009_auto_20240911_0043.py new file mode 100644 index 00000000..eda17988 --- /dev/null +++ b/hackathon_site/registration/migrations/0009_auto_20240911_0043.py @@ -0,0 +1,23 @@ +# Generated by Django 3.2.15 on 2024-09-11 04:43 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('registration', '0008_revert_0007_changes'), + ] + + operations = [ + migrations.AddField( + model_name='application', + name='free_response_pronouns', + field=models.CharField(blank=True, default='', help_text="If you selected 'Other', please specify your pronouns.", max_length=100, null=True), + ), + migrations.AlterField( + model_name='application', + name='pronouns', + field=models.CharField(choices=[(None, ''), ('he-him', 'he/him'), ('he-they', 'he/they'), ('she-her', 'she/her'), ('she-they', 'she/they'), ('they-them', 'they/them'), ('other', 'other'), ('no-answer', 'prefer not to answer')], default='', max_length=50), + ), + ] diff --git a/hackathon_site/registration/models.py b/hackathon_site/registration/models.py index 193b669f..4d83fcd0 100644 --- a/hackathon_site/registration/models.py +++ b/hackathon_site/registration/models.py @@ -28,10 +28,13 @@ def __str__(self): class Application(models.Model): + # TODO: Added 2 new pronoun choices here PRONOUN_CHOICES = [ (None, ""), ("he-him", "he/him"), + ("he-they", "he/they"), ("she-her", "she/her"), + ("she-they", "she/they"), ("they-them", "they/them"), ("other", "other"), ("no-answer", "prefer not to answer"), @@ -89,8 +92,9 @@ class Application(models.Model): ) # TODO: New section here free_response_pronouns = models.CharField( - max_length=20, - null=False, + max_length=100, + null=True, + blank=True, default="", help_text="If you selected 'Other', please specify your pronouns.", ) From 8e3dba8a5ccb6b9e1739f339d037e893d9e08918 Mon Sep 17 00:00:00 2001 From: carmen-chau Date: Wed, 11 Sep 2024 11:23:13 -0400 Subject: [PATCH 04/32] black format changes --- hackathon_site/registration/forms.py | 8 +++-- .../migrations/0009_auto_20240911_0043.py | 33 +++++++++++++++---- 2 files changed, 31 insertions(+), 10 deletions(-) diff --git a/hackathon_site/registration/forms.py b/hackathon_site/registration/forms.py index 59d34f64..85c5474e 100644 --- a/hackathon_site/registration/forms.py +++ b/hackathon_site/registration/forms.py @@ -122,7 +122,7 @@ class Meta: fields = [ "age", "pronouns", - "free_response_pronouns", #TODO: New Section + "free_response_pronouns", # TODO: New Section "ethnicity", "phone_number", "city", @@ -217,8 +217,10 @@ def handle_free_response_pronouns(self): user_free_response_pronouns = self.cleaned_data["free_response_pronouns"] if user_pronouns == "other" and not user_free_response_pronouns: raise forms.ValidationError( - _("Since you've selected 'Other' for pronouns, please state what pronouns you go by. Limit: 100 characters."), - code = 'free_response_pronouns', + _( + "Since you've selected 'Other' for pronouns, please state what pronouns you go by. Limit: 100 characters." + ), + code="free_response_pronouns", ) def save(self, commit=True): diff --git a/hackathon_site/registration/migrations/0009_auto_20240911_0043.py b/hackathon_site/registration/migrations/0009_auto_20240911_0043.py index eda17988..e04cac24 100644 --- a/hackathon_site/registration/migrations/0009_auto_20240911_0043.py +++ b/hackathon_site/registration/migrations/0009_auto_20240911_0043.py @@ -6,18 +6,37 @@ class Migration(migrations.Migration): dependencies = [ - ('registration', '0008_revert_0007_changes'), + ("registration", "0008_revert_0007_changes"), ] operations = [ migrations.AddField( - model_name='application', - name='free_response_pronouns', - field=models.CharField(blank=True, default='', help_text="If you selected 'Other', please specify your pronouns.", max_length=100, null=True), + model_name="application", + name="free_response_pronouns", + field=models.CharField( + blank=True, + default="", + help_text="If you selected 'Other', please specify your pronouns.", + max_length=100, + null=True, + ), ), migrations.AlterField( - model_name='application', - name='pronouns', - field=models.CharField(choices=[(None, ''), ('he-him', 'he/him'), ('he-they', 'he/they'), ('she-her', 'she/her'), ('she-they', 'she/they'), ('they-them', 'they/them'), ('other', 'other'), ('no-answer', 'prefer not to answer')], default='', max_length=50), + model_name="application", + name="pronouns", + field=models.CharField( + choices=[ + (None, ""), + ("he-him", "he/him"), + ("he-they", "he/they"), + ("she-her", "she/her"), + ("she-they", "she/they"), + ("they-them", "they/them"), + ("other", "other"), + ("no-answer", "prefer not to answer"), + ], + default="", + max_length=50, + ), ), ] From 3e4eae33c82323427878223028451ca88efad437 Mon Sep 17 00:00:00 2001 From: carmen-chau Date: Wed, 11 Sep 2024 12:50:53 -0400 Subject: [PATCH 05/32] reverting landing.html changes --- hackathon_site/event/jinja2/event/landing.html | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/hackathon_site/event/jinja2/event/landing.html b/hackathon_site/event/jinja2/event/landing.html index c4bacbff..9176b4b8 100644 --- a/hackathon_site/event/jinja2/event/landing.html +++ b/hackathon_site/event/jinja2/event/landing.html @@ -44,8 +44,7 @@
{% if request.user.is_authenticated %} -{# TODO: Temporary change, revert back to is_application_open()#} - {% if application is none and is_registration_open() %} + {% if application is none and is_application_open() %} Continue Application {% else %} Go to Dashboard @@ -415,4 +414,4 @@

Contact Us

{% block scripts %} -{% endblock %} +{% endblock %} \ No newline at end of file From dea8880cc6c239e71b1f8c5fbf4156aad22e784b Mon Sep 17 00:00:00 2001 From: carmen-chau Date: Fri, 13 Sep 2024 23:49:02 -0400 Subject: [PATCH 06/32] added gender field --- hackathon_site/registration/forms.py | 23 ++++++++-- .../jinja2/registration/application.html | 6 ++- .../migrations/0009_auto_20240911_0043.py | 42 ------------------- .../migrations/0009_auto_20240913_2327.py | 33 +++++++++++++++ hackathon_site/registration/models.py | 29 ++++++++++++- 5 files changed, 85 insertions(+), 48 deletions(-) delete mode 100644 hackathon_site/registration/migrations/0009_auto_20240911_0043.py create mode 100644 hackathon_site/registration/migrations/0009_auto_20240913_2327.py diff --git a/hackathon_site/registration/forms.py b/hackathon_site/registration/forms.py index 85c5474e..c94c4f86 100644 --- a/hackathon_site/registration/forms.py +++ b/hackathon_site/registration/forms.py @@ -123,6 +123,8 @@ class Meta: "age", "pronouns", "free_response_pronouns", # TODO: New Section + "gender", # TODO : New Section + "free_response_gender", # TODO : New Section "ethnicity", "phone_number", "city", @@ -193,10 +195,13 @@ def clean(self): raise forms.ValidationError( _("User has already submitted an application."), code="invalid" ) - # TODO: New line - self.handle_free_response_pronouns() + # TODO: New line (calling an existing method that was never called.... for some reason?) self.clean_age() + # TODO: New line + self.handle_free_response_pronouns() + # TODO: New line + self.handle_free_response_gender() return cleaned_data def clean_age(self): @@ -218,11 +223,23 @@ def handle_free_response_pronouns(self): if user_pronouns == "other" and not user_free_response_pronouns: raise forms.ValidationError( _( - "Since you've selected 'Other' for pronouns, please state what pronouns you go by. Limit: 100 characters." + "Since you've selected 'Other' for pronouns, please state what pronouns you go by." ), code="free_response_pronouns", ) + # TODO: Wrote a new validator for the field "free_response_gender" + def handle_free_response_gender(self): + user_pronouns = self.cleaned_data["gender"] + user_free_response_pronouns = self.cleaned_data["free_response_gender"] + if user_pronouns == "prefer-to-self-describe" and not user_free_response_pronouns: + raise forms.ValidationError( + _( + "Since you've selected 'Prefer to Self Describe' for gender, please state how you would like to be addressed" + ), + code="free_response_gender", + ) + def save(self, commit=True): self.instance = super().save(commit=False) team = Team.objects.create() diff --git a/hackathon_site/registration/jinja2/registration/application.html b/hackathon_site/registration/jinja2/registration/application.html index 4806fdb9..322fdae5 100644 --- a/hackathon_site/registration/jinja2/registration/application.html +++ b/hackathon_site/registration/jinja2/registration/application.html @@ -38,8 +38,12 @@

Personal Information

{{ render_field(form.age, size="s12 m6 select2-wrapper") }} {{ render_field(form.phone_number, size="s12 m6") }} {{ render_field(form.pronouns, size="s12 m6 select2-wrapper") }} - {# TODO: New entry here#} + {# TODO: New entry for free response pronoun section#} {{ render_field(form.free_response_pronouns, show_help_text_as_label=True, size="s12 m6 select2-wrapper") }} + {# TODO: New entry for gender section#} + {{ render_field(form.gender, size="s12 m6 select2-wrapper") }} + {# TODO: New entry for free response gender section#} + {{ render_field(form.free_response_gender, show_help_text_as_label=True, size="s12 m6 select2-wrapper") }} {{ render_field(form.ethnicity, size="s12 m6 select2-wrapper") }} {{ render_field(form.city, size="s12 m6 select2-wrapper added-country-margin formAddTopMargin") }} {{ render_field(form.country, size="s12 m6 select2-wrapper added-country-margin formAddTopMargin") }} diff --git a/hackathon_site/registration/migrations/0009_auto_20240911_0043.py b/hackathon_site/registration/migrations/0009_auto_20240911_0043.py deleted file mode 100644 index e04cac24..00000000 --- a/hackathon_site/registration/migrations/0009_auto_20240911_0043.py +++ /dev/null @@ -1,42 +0,0 @@ -# Generated by Django 3.2.15 on 2024-09-11 04:43 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ("registration", "0008_revert_0007_changes"), - ] - - operations = [ - migrations.AddField( - model_name="application", - name="free_response_pronouns", - field=models.CharField( - blank=True, - default="", - help_text="If you selected 'Other', please specify your pronouns.", - max_length=100, - null=True, - ), - ), - migrations.AlterField( - model_name="application", - name="pronouns", - field=models.CharField( - choices=[ - (None, ""), - ("he-him", "he/him"), - ("he-they", "he/they"), - ("she-her", "she/her"), - ("she-they", "she/they"), - ("they-them", "they/them"), - ("other", "other"), - ("no-answer", "prefer not to answer"), - ], - default="", - max_length=50, - ), - ), - ] diff --git a/hackathon_site/registration/migrations/0009_auto_20240913_2327.py b/hackathon_site/registration/migrations/0009_auto_20240913_2327.py new file mode 100644 index 00000000..82e9444e --- /dev/null +++ b/hackathon_site/registration/migrations/0009_auto_20240913_2327.py @@ -0,0 +1,33 @@ +# Generated by Django 3.2.15 on 2024-09-14 03:27 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('registration', '0008_revert_0007_changes'), + ] + + operations = [ + migrations.AddField( + model_name='application', + name='free_response_gender', + field=models.CharField(blank=True, default='', help_text="If you selected 'Prefer to Self-Describe', please specify.", max_length=100, null=True), + ), + migrations.AddField( + model_name='application', + name='free_response_pronouns', + field=models.CharField(blank=True, default='', help_text="If selected 'Other', please specify", max_length=100, null=True), + ), + migrations.AddField( + model_name='application', + name='gender', + field=models.CharField(choices=[(None, ''), ('man', 'Man'), ('woman', 'Woman'), ('non-binary', 'Non-Binary'), ('prefer-to-self-describe', 'Prefer to Self-Describe'), ('prefer-to-not-answer', 'Prefer to not Answer')], default='', max_length=50), + ), + migrations.AlterField( + model_name='application', + name='pronouns', + field=models.CharField(choices=[(None, ''), ('he-him', 'he/him'), ('he-they', 'he/they'), ('she-her', 'she/her'), ('she-they', 'she/they'), ('they-them', 'they/them'), ('other', 'other'), ('no-answer', 'prefer not to answer')], default='', max_length=50), + ), + ] diff --git a/hackathon_site/registration/models.py b/hackathon_site/registration/models.py index 4d83fcd0..01024b58 100644 --- a/hackathon_site/registration/models.py +++ b/hackathon_site/registration/models.py @@ -40,6 +40,16 @@ class Application(models.Model): ("no-answer", "prefer not to answer"), ] + # TODO: Added a new field (Gender) here + GENDER_CHOICES = [ + (None, ""), + ("man", "Man"), + ("woman", "Woman"), + ("non-binary", "Non-Binary"), + ("prefer-to-self-describe", "Prefer to Self-Describe"), + ("prefer-to-not-answer", "Prefer to not Answer"), + ] + ETHNICITY_CHOICES = [ (None, ""), ("american-native", "American Indian or Alaskan Native"), @@ -90,13 +100,28 @@ class Application(models.Model): pronouns = models.CharField( max_length=50, choices=PRONOUN_CHOICES, null=False, default="" ) - # TODO: New section here + + # TODO: New section to allow people to specify pronouns (if selected "Other") free_response_pronouns = models.CharField( max_length=100, null=True, blank=True, default="", - help_text="If you selected 'Other', please specify your pronouns.", + help_text="If selected 'Other', please specify", + ) + + # TODO: New section for "Gender" dropdown + gender = models.CharField( + max_length=50, choices=GENDER_CHOICES, null=False, default="" + ) + + # TODO: New section to allow people to specify gender identification (if selected "Prefer to Self-Describe") + free_response_gender = models.CharField( + max_length=100, + null=True, + blank=True, + default="", + help_text="If you selected 'Prefer to Self-Describe', please specify.", ) ethnicity = models.CharField(max_length=50, choices=ETHNICITY_CHOICES, null=False) From bd68815702bb9dc976175ce1b428c26375932c8f Mon Sep 17 00:00:00 2001 From: carmen-chau Date: Fri, 13 Sep 2024 23:59:13 -0400 Subject: [PATCH 07/32] removed ethnicity --- hackathon_site/registration/forms.py | 2 +- .../jinja2/registration/application.html | 3 ++- ...913_2327.py => 0009_auto_20240913_2354.py} | 6 ++++- hackathon_site/registration/models.py | 24 ++++++++++--------- 4 files changed, 21 insertions(+), 14 deletions(-) rename hackathon_site/registration/migrations/{0009_auto_20240913_2327.py => 0009_auto_20240913_2354.py} (90%) diff --git a/hackathon_site/registration/forms.py b/hackathon_site/registration/forms.py index c94c4f86..477e457b 100644 --- a/hackathon_site/registration/forms.py +++ b/hackathon_site/registration/forms.py @@ -125,7 +125,7 @@ class Meta: "free_response_pronouns", # TODO: New Section "gender", # TODO : New Section "free_response_gender", # TODO : New Section - "ethnicity", + # "ethnicity", # TODO: Commenting out this section "phone_number", "city", "country", diff --git a/hackathon_site/registration/jinja2/registration/application.html b/hackathon_site/registration/jinja2/registration/application.html index 322fdae5..35d4bcc5 100644 --- a/hackathon_site/registration/jinja2/registration/application.html +++ b/hackathon_site/registration/jinja2/registration/application.html @@ -44,7 +44,8 @@

Personal Information

{{ render_field(form.gender, size="s12 m6 select2-wrapper") }} {# TODO: New entry for free response gender section#} {{ render_field(form.free_response_gender, show_help_text_as_label=True, size="s12 m6 select2-wrapper") }} - {{ render_field(form.ethnicity, size="s12 m6 select2-wrapper") }} + {# TODO: Commenting out the ethnicity section#} +{# {{ render_field(form.ethnicity, size="s12 m6 select2-wrapper") }}#} {{ render_field(form.city, size="s12 m6 select2-wrapper added-country-margin formAddTopMargin") }} {{ render_field(form.country, size="s12 m6 select2-wrapper added-country-margin formAddTopMargin") }} diff --git a/hackathon_site/registration/migrations/0009_auto_20240913_2327.py b/hackathon_site/registration/migrations/0009_auto_20240913_2354.py similarity index 90% rename from hackathon_site/registration/migrations/0009_auto_20240913_2327.py rename to hackathon_site/registration/migrations/0009_auto_20240913_2354.py index 82e9444e..010ba4ef 100644 --- a/hackathon_site/registration/migrations/0009_auto_20240913_2327.py +++ b/hackathon_site/registration/migrations/0009_auto_20240913_2354.py @@ -1,4 +1,4 @@ -# Generated by Django 3.2.15 on 2024-09-14 03:27 +# Generated by Django 3.2.15 on 2024-09-14 03:54 from django.db import migrations, models @@ -10,6 +10,10 @@ class Migration(migrations.Migration): ] operations = [ + migrations.RemoveField( + model_name='application', + name='ethnicity', + ), migrations.AddField( model_name='application', name='free_response_gender', diff --git a/hackathon_site/registration/models.py b/hackathon_site/registration/models.py index 01024b58..d6c028ee 100644 --- a/hackathon_site/registration/models.py +++ b/hackathon_site/registration/models.py @@ -50,16 +50,17 @@ class Application(models.Model): ("prefer-to-not-answer", "Prefer to not Answer"), ] - ETHNICITY_CHOICES = [ - (None, ""), - ("american-native", "American Indian or Alaskan Native"), - ("asian-pacific-islander", "Asian / Pacific Islander"), - ("black-african-american", "Black or African American"), - ("hispanic", "Hispanic"), - ("caucasian", "White / Caucasian"), - ("other", "Multiple ethnicity / Other"), - ("no-answer", "Prefer not to answer"), - ] + # TODO: Commenting out this choice + # ETHNICITY_CHOICES = [ + # (None, ""), + # ("american-native", "American Indian or Alaskan Native"), + # ("asian-pacific-islander", "Asian / Pacific Islander"), + # ("black-african-american", "Black or African American"), + # ("hispanic", "Hispanic"), + # ("caucasian", "White / Caucasian"), + # ("other", "Multiple ethnicity / Other"), + # ("no-answer", "Prefer not to answer"), + # ] STUDY_LEVEL_CHOICES = [ (None, ""), @@ -124,7 +125,8 @@ class Application(models.Model): help_text="If you selected 'Prefer to Self-Describe', please specify.", ) - ethnicity = models.CharField(max_length=50, choices=ETHNICITY_CHOICES, null=False) + # TODO: Commenting out the ethnicity section + # ethnicity = models.CharField(max_length=50, choices=ETHNICITY_CHOICES, null=False) phone_number = models.CharField( max_length=20, null=False, From f81136aa30705556c352f01b766bd74cf1e5c79a Mon Sep 17 00:00:00 2001 From: carmen-chau Date: Sat, 14 Sep 2024 00:16:36 -0400 Subject: [PATCH 08/32] added tshirt size --- hackathon_site/registration/forms.py | 1 + .../jinja2/registration/application.html | 2 ++ ...40913_2354.py => 0009_auto_20240914_0011.py} | 7 ++++++- hackathon_site/registration/models.py | 17 +++++++++++++++++ 4 files changed, 26 insertions(+), 1 deletion(-) rename hackathon_site/registration/migrations/{0009_auto_20240913_2354.py => 0009_auto_20240914_0011.py} (84%) diff --git a/hackathon_site/registration/forms.py b/hackathon_site/registration/forms.py index 477e457b..49507003 100644 --- a/hackathon_site/registration/forms.py +++ b/hackathon_site/registration/forms.py @@ -129,6 +129,7 @@ class Meta: "phone_number", "city", "country", + "tshirt_size", # TODO: New Section "school", "study_level", "graduation_year", diff --git a/hackathon_site/registration/jinja2/registration/application.html b/hackathon_site/registration/jinja2/registration/application.html index 35d4bcc5..674076df 100644 --- a/hackathon_site/registration/jinja2/registration/application.html +++ b/hackathon_site/registration/jinja2/registration/application.html @@ -48,6 +48,8 @@

Personal Information

{# {{ render_field(form.ethnicity, size="s12 m6 select2-wrapper") }}#} {{ render_field(form.city, size="s12 m6 select2-wrapper added-country-margin formAddTopMargin") }} {{ render_field(form.country, size="s12 m6 select2-wrapper added-country-margin formAddTopMargin") }} + {# TODO: New section for T-shirt size#} + {{ render_field(form.tshirt_size, size="s12 m6 select2-wrapper") }}

Education

diff --git a/hackathon_site/registration/migrations/0009_auto_20240913_2354.py b/hackathon_site/registration/migrations/0009_auto_20240914_0011.py similarity index 84% rename from hackathon_site/registration/migrations/0009_auto_20240913_2354.py rename to hackathon_site/registration/migrations/0009_auto_20240914_0011.py index 010ba4ef..e6181fa8 100644 --- a/hackathon_site/registration/migrations/0009_auto_20240913_2354.py +++ b/hackathon_site/registration/migrations/0009_auto_20240914_0011.py @@ -1,4 +1,4 @@ -# Generated by Django 3.2.15 on 2024-09-14 03:54 +# Generated by Django 3.2.15 on 2024-09-14 04:11 from django.db import migrations, models @@ -29,6 +29,11 @@ class Migration(migrations.Migration): name='gender', field=models.CharField(choices=[(None, ''), ('man', 'Man'), ('woman', 'Woman'), ('non-binary', 'Non-Binary'), ('prefer-to-self-describe', 'Prefer to Self-Describe'), ('prefer-to-not-answer', 'Prefer to not Answer')], default='', max_length=50), ), + migrations.AddField( + model_name='application', + name='tshirt_size', + field=models.CharField(choices=[(None, ''), ('S', 'S'), ('M', 'M'), ('L', 'L'), ('XL', 'XL')], default='', max_length=50), + ), migrations.AlterField( model_name='application', name='pronouns', diff --git a/hackathon_site/registration/models.py b/hackathon_site/registration/models.py index d6c028ee..9cf29dce 100644 --- a/hackathon_site/registration/models.py +++ b/hackathon_site/registration/models.py @@ -62,6 +62,15 @@ class Application(models.Model): # ("no-answer", "Prefer not to answer"), # ] + # TODO: Adding T-shirt choices + TSHIRT_SIZE_CHOICES = [ + (None, ""), + ("S", "S"), + ("M", "M"), + ("L", "L"), + ("XL", "XL"), + ] + STUDY_LEVEL_CHOICES = [ (None, ""), ("less-than-secondary", "Less than Secondary / High School"), @@ -127,6 +136,7 @@ class Application(models.Model): # TODO: Commenting out the ethnicity section # ethnicity = models.CharField(max_length=50, choices=ETHNICITY_CHOICES, null=False) + phone_number = models.CharField( max_length=20, null=False, @@ -139,6 +149,13 @@ class Application(models.Model): ) city = models.CharField(max_length=255, null=False) country = models.CharField(max_length=255, null=False) + + # TODO: Adding a "T-shirt" section + tshirt_size = models.CharField( + max_length=50, choices=TSHIRT_SIZE_CHOICES, null=False, default="" + ) + + school = models.CharField(max_length=255, null=False,) study_level = models.CharField( max_length=50, From 856ea3ca39be45e464c277184248b516c6a6599c Mon Sep 17 00:00:00 2001 From: carmen-chau Date: Sat, 14 Sep 2024 01:21:40 -0400 Subject: [PATCH 09/32] added dietary restriction, made ethnicity changes --- hackathon_site/registration/forms.py | 22 ++++++-- .../jinja2/registration/application.html | 10 ++-- .../migrations/0009_auto_20240914_0011.py | 42 --------------- hackathon_site/registration/models.py | 52 ++++++++++++++----- 4 files changed, 65 insertions(+), 61 deletions(-) delete mode 100644 hackathon_site/registration/migrations/0009_auto_20240914_0011.py diff --git a/hackathon_site/registration/forms.py b/hackathon_site/registration/forms.py index 49507003..f6f20273 100644 --- a/hackathon_site/registration/forms.py +++ b/hackathon_site/registration/forms.py @@ -130,6 +130,8 @@ class Meta: "city", "country", "tshirt_size", # TODO: New Section + "dietary_restrictions", # TODO: New Section + "free_response_dietary_restrictions", #TODO: New Section "school", "study_level", "graduation_year", @@ -203,6 +205,8 @@ def clean(self): self.handle_free_response_pronouns() # TODO: New line self.handle_free_response_gender() + # TODO: New line + self.handle_free_response_dietary_restrictions() return cleaned_data def clean_age(self): @@ -231,9 +235,9 @@ def handle_free_response_pronouns(self): # TODO: Wrote a new validator for the field "free_response_gender" def handle_free_response_gender(self): - user_pronouns = self.cleaned_data["gender"] - user_free_response_pronouns = self.cleaned_data["free_response_gender"] - if user_pronouns == "prefer-to-self-describe" and not user_free_response_pronouns: + user_gender = self.cleaned_data["gender"] + user_free_response_gender = self.cleaned_data["free_response_gender"] + if user_gender == "prefer-to-self-describe" and not user_free_response_gender: raise forms.ValidationError( _( "Since you've selected 'Prefer to Self Describe' for gender, please state how you would like to be addressed" @@ -241,6 +245,18 @@ def handle_free_response_gender(self): code="free_response_gender", ) + # TODO: Wrote a new validator for the field "free_response_gender" + def handle_free_response_dietary_restrictions(self): + user_dietary_restrictions = self.cleaned_data["dietary_restrictions"] + user_free_response_dietary_restrictions = self.cleaned_data["free_response_dietary_restrictions"] + if ((user_dietary_restrictions == "allergies" or user_dietary_restrictions == "other") and not user_free_response_dietary_restrictions): + raise forms.ValidationError( + _( + "Please provide more information about your dietary restrictions." + ), + code="free_response_dietary_restrictions", + ) + def save(self, commit=True): self.instance = super().save(commit=False) team = Team.objects.create() diff --git a/hackathon_site/registration/jinja2/registration/application.html b/hackathon_site/registration/jinja2/registration/application.html index 674076df..f62a6829 100644 --- a/hackathon_site/registration/jinja2/registration/application.html +++ b/hackathon_site/registration/jinja2/registration/application.html @@ -42,14 +42,18 @@

Personal Information

{{ render_field(form.free_response_pronouns, show_help_text_as_label=True, size="s12 m6 select2-wrapper") }} {# TODO: New entry for gender section#} {{ render_field(form.gender, size="s12 m6 select2-wrapper") }} - {# TODO: New entry for free response gender section#} + {# TODO: New entry for free response gender section#} {{ render_field(form.free_response_gender, show_help_text_as_label=True, size="s12 m6 select2-wrapper") }} - {# TODO: Commenting out the ethnicity section#} -{# {{ render_field(form.ethnicity, size="s12 m6 select2-wrapper") }}#} + {# TODO: Commenting out the ethnicity section#} + {# {{ render_field(form.ethnicity, size="s12 m6 select2-wrapper") }}#} {{ render_field(form.city, size="s12 m6 select2-wrapper added-country-margin formAddTopMargin") }} {{ render_field(form.country, size="s12 m6 select2-wrapper added-country-margin formAddTopMargin") }} {# TODO: New section for T-shirt size#} {{ render_field(form.tshirt_size, size="s12 m6 select2-wrapper") }} + {# TODO: New section for dietary restrictions#} + {{ render_field(form.dietary_restrictions, size="s12 m6 select2-wrapper") }} + {# TODO: New entry for free response dietary restriction section#} + {{ render_field(form.free_response_dietary_restrictions, show_help_text_as_label=True, size="s12 m6 select2-wrapper") }}

Education

diff --git a/hackathon_site/registration/migrations/0009_auto_20240914_0011.py b/hackathon_site/registration/migrations/0009_auto_20240914_0011.py deleted file mode 100644 index e6181fa8..00000000 --- a/hackathon_site/registration/migrations/0009_auto_20240914_0011.py +++ /dev/null @@ -1,42 +0,0 @@ -# Generated by Django 3.2.15 on 2024-09-14 04:11 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('registration', '0008_revert_0007_changes'), - ] - - operations = [ - migrations.RemoveField( - model_name='application', - name='ethnicity', - ), - migrations.AddField( - model_name='application', - name='free_response_gender', - field=models.CharField(blank=True, default='', help_text="If you selected 'Prefer to Self-Describe', please specify.", max_length=100, null=True), - ), - migrations.AddField( - model_name='application', - name='free_response_pronouns', - field=models.CharField(blank=True, default='', help_text="If selected 'Other', please specify", max_length=100, null=True), - ), - migrations.AddField( - model_name='application', - name='gender', - field=models.CharField(choices=[(None, ''), ('man', 'Man'), ('woman', 'Woman'), ('non-binary', 'Non-Binary'), ('prefer-to-self-describe', 'Prefer to Self-Describe'), ('prefer-to-not-answer', 'Prefer to not Answer')], default='', max_length=50), - ), - migrations.AddField( - model_name='application', - name='tshirt_size', - field=models.CharField(choices=[(None, ''), ('S', 'S'), ('M', 'M'), ('L', 'L'), ('XL', 'XL')], default='', max_length=50), - ), - migrations.AlterField( - model_name='application', - name='pronouns', - field=models.CharField(choices=[(None, ''), ('he-him', 'he/him'), ('he-they', 'he/they'), ('she-her', 'she/her'), ('she-they', 'she/they'), ('they-them', 'they/them'), ('other', 'other'), ('no-answer', 'prefer not to answer')], default='', max_length=50), - ), - ] diff --git a/hackathon_site/registration/models.py b/hackathon_site/registration/models.py index 9cf29dce..83d0e969 100644 --- a/hackathon_site/registration/models.py +++ b/hackathon_site/registration/models.py @@ -50,17 +50,16 @@ class Application(models.Model): ("prefer-to-not-answer", "Prefer to not Answer"), ] - # TODO: Commenting out this choice - # ETHNICITY_CHOICES = [ - # (None, ""), - # ("american-native", "American Indian or Alaskan Native"), - # ("asian-pacific-islander", "Asian / Pacific Islander"), - # ("black-african-american", "Black or African American"), - # ("hispanic", "Hispanic"), - # ("caucasian", "White / Caucasian"), - # ("other", "Multiple ethnicity / Other"), - # ("no-answer", "Prefer not to answer"), - # ] + ETHNICITY_CHOICES = [ + (None, ""), + ("american-native", "American Indian or Alaskan Native"), + ("asian-pacific-islander", "Asian / Pacific Islander"), + ("black-african-american", "Black or African American"), + ("hispanic", "Hispanic"), + ("caucasian", "White / Caucasian"), + ("other", "Multiple ethnicity / Other"), + ("no-answer", "Prefer not to answer"), + ] # TODO: Adding T-shirt choices TSHIRT_SIZE_CHOICES = [ @@ -71,6 +70,20 @@ class Application(models.Model): ("XL", "XL"), ] + # TODO: Adding dietary restriction choices + DIETARY_RESTRICTIONS_CHOICES = [ + (None, ""), + ("none", "None"), + ("halal", "Halal"), + ("vegetarian", "Vegetarian"), + ("vegan", "Vegan"), + ("celiac-disease", "Celiac Disease"), + ("allergies", "Allergies"), + ("kosher", "Kosher"), + ("gluten-free", "Gluten Free"), + ("other", "Other"), + ] + STUDY_LEVEL_CHOICES = [ (None, ""), ("less-than-secondary", "Less than Secondary / High School"), @@ -134,8 +147,8 @@ class Application(models.Model): help_text="If you selected 'Prefer to Self-Describe', please specify.", ) - # TODO: Commenting out the ethnicity section - # ethnicity = models.CharField(max_length=50, choices=ETHNICITY_CHOICES, null=False) + # TODO: Making this ethnicity section OPTIONAL + ethnicity = models.CharField(max_length=50, choices=ETHNICITY_CHOICES, null=True, blank=True) phone_number = models.CharField( max_length=20, @@ -155,6 +168,19 @@ class Application(models.Model): max_length=50, choices=TSHIRT_SIZE_CHOICES, null=False, default="" ) + # TODO: Adding a "Dietary Restriction" section + dietary_restrictions = models.CharField( + max_length=50, choices=DIETARY_RESTRICTIONS_CHOICES, null=False, default="" + ) + + # TODO: New section to allow people to clarify dietary restrictions. Applicable if selected "Other" or "Allergies + free_response_dietary_restrictions = models.CharField( + max_length=100, + null=True, + blank=True, + default="", + help_text="If you selected 'Allergies' or 'Other', please specify.", + ) school = models.CharField(max_length=255, null=False,) study_level = models.CharField( From 617ef950196ea36c353b7635557868c82205330b Mon Sep 17 00:00:00 2001 From: carmen-chau Date: Sat, 14 Sep 2024 01:22:15 -0400 Subject: [PATCH 10/32] black changes --- hackathon_site/registration/forms.py | 19 +-- .../migrations/0009_auto_20240914_0058.py | 128 ++++++++++++++++++ hackathon_site/registration/models.py | 9 +- 3 files changed, 146 insertions(+), 10 deletions(-) create mode 100644 hackathon_site/registration/migrations/0009_auto_20240914_0058.py diff --git a/hackathon_site/registration/forms.py b/hackathon_site/registration/forms.py index f6f20273..acd8baf4 100644 --- a/hackathon_site/registration/forms.py +++ b/hackathon_site/registration/forms.py @@ -123,15 +123,15 @@ class Meta: "age", "pronouns", "free_response_pronouns", # TODO: New Section - "gender", # TODO : New Section + "gender", # TODO : New Section "free_response_gender", # TODO : New Section # "ethnicity", # TODO: Commenting out this section "phone_number", "city", "country", - "tshirt_size", # TODO: New Section + "tshirt_size", # TODO: New Section "dietary_restrictions", # TODO: New Section - "free_response_dietary_restrictions", #TODO: New Section + "free_response_dietary_restrictions", # TODO: New Section "school", "study_level", "graduation_year", @@ -248,12 +248,15 @@ def handle_free_response_gender(self): # TODO: Wrote a new validator for the field "free_response_gender" def handle_free_response_dietary_restrictions(self): user_dietary_restrictions = self.cleaned_data["dietary_restrictions"] - user_free_response_dietary_restrictions = self.cleaned_data["free_response_dietary_restrictions"] - if ((user_dietary_restrictions == "allergies" or user_dietary_restrictions == "other") and not user_free_response_dietary_restrictions): + user_free_response_dietary_restrictions = self.cleaned_data[ + "free_response_dietary_restrictions" + ] + if ( + user_dietary_restrictions == "allergies" + or user_dietary_restrictions == "other" + ) and not user_free_response_dietary_restrictions: raise forms.ValidationError( - _( - "Please provide more information about your dietary restrictions." - ), + _("Please provide more information about your dietary restrictions."), code="free_response_dietary_restrictions", ) diff --git a/hackathon_site/registration/migrations/0009_auto_20240914_0058.py b/hackathon_site/registration/migrations/0009_auto_20240914_0058.py new file mode 100644 index 00000000..7a45c3ad --- /dev/null +++ b/hackathon_site/registration/migrations/0009_auto_20240914_0058.py @@ -0,0 +1,128 @@ +# Generated by Django 3.2.15 on 2024-09-14 04:58 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ("registration", "0008_revert_0007_changes"), + ] + + operations = [ + migrations.AddField( + model_name="application", + name="dietary_restrictions", + field=models.CharField( + choices=[ + (None, ""), + ("none", "None"), + ("halal", "Halal"), + ("vegetarian", "Vegetarian"), + ("vegan", "Vegan"), + ("celiac-disease", "Celiac Disease"), + ("allergies", "Allergies"), + ("kosher", "Kosher"), + ("gluten-free", "Gluten Free"), + ("other", "Other"), + ], + default="", + max_length=50, + ), + ), + migrations.AddField( + model_name="application", + name="free_response_dietary_restrictions", + field=models.CharField( + blank=True, + default="", + help_text="If you selected 'Allergies' or 'Other', please specify.", + max_length=100, + null=True, + ), + ), + migrations.AddField( + model_name="application", + name="free_response_gender", + field=models.CharField( + blank=True, + default="", + help_text="If you selected 'Prefer to Self-Describe', please specify.", + max_length=100, + null=True, + ), + ), + migrations.AddField( + model_name="application", + name="free_response_pronouns", + field=models.CharField( + blank=True, + default="", + help_text="If selected 'Other', please specify", + max_length=100, + null=True, + ), + ), + migrations.AddField( + model_name="application", + name="gender", + field=models.CharField( + choices=[ + (None, ""), + ("man", "Man"), + ("woman", "Woman"), + ("non-binary", "Non-Binary"), + ("prefer-to-self-describe", "Prefer to Self-Describe"), + ("prefer-to-not-answer", "Prefer to not Answer"), + ], + default="", + max_length=50, + ), + ), + migrations.AddField( + model_name="application", + name="tshirt_size", + field=models.CharField( + choices=[(None, ""), ("S", "S"), ("M", "M"), ("L", "L"), ("XL", "XL")], + default="", + max_length=50, + ), + ), + migrations.AlterField( + model_name="application", + name="ethnicity", + field=models.CharField( + blank=True, + choices=[ + (None, ""), + ("american-native", "American Indian or Alaskan Native"), + ("asian-pacific-islander", "Asian / Pacific Islander"), + ("black-african-american", "Black or African American"), + ("hispanic", "Hispanic"), + ("caucasian", "White / Caucasian"), + ("other", "Multiple ethnicity / Other"), + ("no-answer", "Prefer not to answer"), + ], + max_length=50, + null=True, + ), + ), + migrations.AlterField( + model_name="application", + name="pronouns", + field=models.CharField( + choices=[ + (None, ""), + ("he-him", "he/him"), + ("he-they", "he/they"), + ("she-her", "she/her"), + ("she-they", "she/they"), + ("they-them", "they/them"), + ("other", "other"), + ("no-answer", "prefer not to answer"), + ], + default="", + max_length=50, + ), + ), + ] diff --git a/hackathon_site/registration/models.py b/hackathon_site/registration/models.py index 83d0e969..e3af4858 100644 --- a/hackathon_site/registration/models.py +++ b/hackathon_site/registration/models.py @@ -148,7 +148,9 @@ class Application(models.Model): ) # TODO: Making this ethnicity section OPTIONAL - ethnicity = models.CharField(max_length=50, choices=ETHNICITY_CHOICES, null=True, blank=True) + ethnicity = models.CharField( + max_length=50, choices=ETHNICITY_CHOICES, null=True, blank=True + ) phone_number = models.CharField( max_length=20, @@ -182,7 +184,10 @@ class Application(models.Model): help_text="If you selected 'Allergies' or 'Other', please specify.", ) - school = models.CharField(max_length=255, null=False,) + school = models.CharField( + max_length=255, + null=False, + ) study_level = models.CharField( max_length=50, help_text="Level of Study", From 8a5c3c667d0c7a826a6ab6e43b50d67abcb6f017 Mon Sep 17 00:00:00 2001 From: carmen-chau Date: Sat, 14 Sep 2024 01:29:01 -0400 Subject: [PATCH 11/32] black.... again? --- hackathon_site/registration/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hackathon_site/registration/models.py b/hackathon_site/registration/models.py index e3af4858..50d278e1 100644 --- a/hackathon_site/registration/models.py +++ b/hackathon_site/registration/models.py @@ -175,7 +175,7 @@ class Application(models.Model): max_length=50, choices=DIETARY_RESTRICTIONS_CHOICES, null=False, default="" ) - # TODO: New section to allow people to clarify dietary restrictions. Applicable if selected "Other" or "Allergies + # TODO: New section to allow people to clarify dietary restrictions if selected "Other" or "Allergies free_response_dietary_restrictions = models.CharField( max_length=100, null=True, From 436d9ba6e1590580e0aeadb9d85ae6ec5dbf7f6d Mon Sep 17 00:00:00 2001 From: carmen-chau Date: Sat, 14 Sep 2024 01:35:31 -0400 Subject: [PATCH 12/32] attempting to fix black problems --- hackathon_site/registration/models.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hackathon_site/registration/models.py b/hackathon_site/registration/models.py index 50d278e1..02af3836 100644 --- a/hackathon_site/registration/models.py +++ b/hackathon_site/registration/models.py @@ -183,7 +183,8 @@ class Application(models.Model): default="", help_text="If you selected 'Allergies' or 'Other', please specify.", ) - + # THIS IS A DUMMY COMMENT + # TRYING TO TRIGGER BLACK FORMATTING school = models.CharField( max_length=255, null=False, From 1a53d3036cf3734c73a505a2075d604e70b71393 Mon Sep 17 00:00:00 2001 From: carmen-chau Date: Sat, 14 Sep 2024 01:37:30 -0400 Subject: [PATCH 13/32] deleting dummy comment --- hackathon_site/registration/models.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/hackathon_site/registration/models.py b/hackathon_site/registration/models.py index 02af3836..7f5940cd 100644 --- a/hackathon_site/registration/models.py +++ b/hackathon_site/registration/models.py @@ -183,8 +183,7 @@ class Application(models.Model): default="", help_text="If you selected 'Allergies' or 'Other', please specify.", ) - # THIS IS A DUMMY COMMENT - # TRYING TO TRIGGER BLACK FORMATTING + school = models.CharField( max_length=255, null=False, From a26888ddf5fe8da3dc837d428c6a7b1a9ab7a44c Mon Sep 17 00:00:00 2001 From: carmen-chau Date: Sat, 14 Sep 2024 13:44:50 -0400 Subject: [PATCH 14/32] i hope this black fix works --- hackathon_site/registration/models.py | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/hackathon_site/registration/models.py b/hackathon_site/registration/models.py index 7f5940cd..adb66a48 100644 --- a/hackathon_site/registration/models.py +++ b/hackathon_site/registration/models.py @@ -62,13 +62,7 @@ class Application(models.Model): ] # TODO: Adding T-shirt choices - TSHIRT_SIZE_CHOICES = [ - (None, ""), - ("S", "S"), - ("M", "M"), - ("L", "L"), - ("XL", "XL"), - ] + TSHIRT_SIZE_CHOICES = [(None, ""), ("S", "S"), ("M", "M"), ("L", "L"), ("XL", "XL")] # TODO: Adding dietary restriction choices DIETARY_RESTRICTIONS_CHOICES = [ @@ -183,11 +177,8 @@ class Application(models.Model): default="", help_text="If you selected 'Allergies' or 'Other', please specify.", ) - - school = models.CharField( - max_length=255, - null=False, - ) + + school = models.CharField(max_length=255, null=False) study_level = models.CharField( max_length=50, help_text="Level of Study", From 89b3b7cab7053676eada08eec9c749e64c479eaa Mon Sep 17 00:00:00 2001 From: carmen-chau Date: Sat, 14 Sep 2024 23:10:19 -0400 Subject: [PATCH 15/32] added under-represented group question --- hackathon_site/registration/forms.py | 1 + .../jinja2/registration/application.html | 2 ++ ...914_0058.py => 0009_auto_20240914_2258.py} | 21 +++++++++++++++---- hackathon_site/registration/models.py | 17 +++++++++++++++ 4 files changed, 37 insertions(+), 4 deletions(-) rename hackathon_site/registration/migrations/{0009_auto_20240914_0058.py => 0009_auto_20240914_2258.py} (87%) diff --git a/hackathon_site/registration/forms.py b/hackathon_site/registration/forms.py index acd8baf4..bb4111bb 100644 --- a/hackathon_site/registration/forms.py +++ b/hackathon_site/registration/forms.py @@ -132,6 +132,7 @@ class Meta: "tshirt_size", # TODO: New Section "dietary_restrictions", # TODO: New Section "free_response_dietary_restrictions", # TODO: New Section + "under_represented_group", # TODO: New Section "school", "study_level", "graduation_year", diff --git a/hackathon_site/registration/jinja2/registration/application.html b/hackathon_site/registration/jinja2/registration/application.html index f62a6829..8bca2a0b 100644 --- a/hackathon_site/registration/jinja2/registration/application.html +++ b/hackathon_site/registration/jinja2/registration/application.html @@ -54,6 +54,8 @@

Personal Information

{{ render_field(form.dietary_restrictions, size="s12 m6 select2-wrapper") }} {# TODO: New entry for free response dietary restriction section#} {{ render_field(form.free_response_dietary_restrictions, show_help_text_as_label=True, size="s12 m6 select2-wrapper") }} + {# TODO: New entry for under-represented group#} + {{ render_field(form.under_represented_group, show_help_text_as_label=True, size="s12 m6 select2-wrapper") }}

Education

diff --git a/hackathon_site/registration/migrations/0009_auto_20240914_0058.py b/hackathon_site/registration/migrations/0009_auto_20240914_2258.py similarity index 87% rename from hackathon_site/registration/migrations/0009_auto_20240914_0058.py rename to hackathon_site/registration/migrations/0009_auto_20240914_2258.py index 7a45c3ad..1468ff8a 100644 --- a/hackathon_site/registration/migrations/0009_auto_20240914_0058.py +++ b/hackathon_site/registration/migrations/0009_auto_20240914_2258.py @@ -1,13 +1,11 @@ -# Generated by Django 3.2.15 on 2024-09-14 04:58 +# Generated by Django 3.2.15 on 2024-09-15 02:58 from django.db import migrations, models class Migration(migrations.Migration): - dependencies = [ - ("registration", "0008_revert_0007_changes"), - ] + dependencies = [("registration", "0008_revert_0007_changes")] operations = [ migrations.AddField( @@ -88,6 +86,21 @@ class Migration(migrations.Migration): max_length=50, ), ), + migrations.AddField( + model_name="application", + name="under_represented_group", + field=models.CharField( + choices=[ + (None, ""), + ("yes", "Yes"), + ("no", "No"), + ("unsure", "Unsure"), + ], + default="", + help_text="Are you in an underrepresented group in tech?", + max_length=50, + ), + ), migrations.AlterField( model_name="application", name="ethnicity", diff --git a/hackathon_site/registration/models.py b/hackathon_site/registration/models.py index adb66a48..ef09f009 100644 --- a/hackathon_site/registration/models.py +++ b/hackathon_site/registration/models.py @@ -78,6 +78,14 @@ class Application(models.Model): ("other", "Other"), ] + # TODO: Adding UNDER_REPRESENTED_GROUP choices + UNDER_REPRESENTED_GROUP_CHOICES = [ + (None, ""), + ("yes", "Yes"), + ("no", "No"), + ("unsure", "Unsure"), + ] + STUDY_LEVEL_CHOICES = [ (None, ""), ("less-than-secondary", "Less than Secondary / High School"), @@ -178,6 +186,15 @@ class Application(models.Model): help_text="If you selected 'Allergies' or 'Other', please specify.", ) + # TODO: Adding a "Under-represented group" section + under_represented_group = models.CharField( + max_length=50, + choices=UNDER_REPRESENTED_GROUP_CHOICES, + null=False, + default="", + help_text="Are you in an underrepresented group in tech?", + ) + school = models.CharField(max_length=255, null=False) study_level = models.CharField( max_length=50, From 07f4328372e632df3412a66217fef9a55f87e8c6 Mon Sep 17 00:00:00 2001 From: carmen-chau Date: Sat, 14 Sep 2024 23:37:42 -0400 Subject: [PATCH 16/32] added sexual identity: --- hackathon_site/registration/forms.py | 21 +++++++++++++ .../jinja2/registration/application.html | 4 +++ ...914_2258.py => 0009_auto_20240914_2334.py} | 30 ++++++++++++++++++- hackathon_site/registration/models.py | 28 +++++++++++++++++ 4 files changed, 82 insertions(+), 1 deletion(-) rename hackathon_site/registration/migrations/{0009_auto_20240914_2258.py => 0009_auto_20240914_2334.py} (80%) diff --git a/hackathon_site/registration/forms.py b/hackathon_site/registration/forms.py index bb4111bb..36f0e0e0 100644 --- a/hackathon_site/registration/forms.py +++ b/hackathon_site/registration/forms.py @@ -133,6 +133,8 @@ class Meta: "dietary_restrictions", # TODO: New Section "free_response_dietary_restrictions", # TODO: New Section "under_represented_group", # TODO: New Section + "sexual_identity", # TODO: New Section + "free_response_sexual_identity", # TODO: New Section "school", "study_level", "graduation_year", @@ -208,6 +210,8 @@ def clean(self): self.handle_free_response_gender() # TODO: New line self.handle_free_response_dietary_restrictions() + # TODO: New line + self.handle_free_response_sexual_identity() return cleaned_data def clean_age(self): @@ -261,6 +265,23 @@ def handle_free_response_dietary_restrictions(self): code="free_response_dietary_restrictions", ) + # TODO: Wrote a new validator for the field "sexual_identity" + def handle_free_response_sexual_identity(self): + user_sexual_identity = self.cleaned_data["sexual_identity"] + user_free_response_sexual_identity = self.cleaned_data[ + "free_response_sexual_identity" + ] + if ( + user_sexual_identity == "different-identity" + and not user_free_response_sexual_identity + ): + raise forms.ValidationError( + _( + "You've selected 'Different Identity', please state how you would like to identify yourself" + ), + code="free_response_sexual_identity", + ) + def save(self, commit=True): self.instance = super().save(commit=False) team = Team.objects.create() diff --git a/hackathon_site/registration/jinja2/registration/application.html b/hackathon_site/registration/jinja2/registration/application.html index 8bca2a0b..2aba727b 100644 --- a/hackathon_site/registration/jinja2/registration/application.html +++ b/hackathon_site/registration/jinja2/registration/application.html @@ -44,6 +44,10 @@

Personal Information

{{ render_field(form.gender, size="s12 m6 select2-wrapper") }} {# TODO: New entry for free response gender section#} {{ render_field(form.free_response_gender, show_help_text_as_label=True, size="s12 m6 select2-wrapper") }} + {# TODO: New entry for sexual identity section#} + {{ render_field(form.sexual_identity, show_help_text_as_label=True, size="s12 m6 select2-wrapper") }} + {# TODO: New entry for free response sexual identity section#} + {{ render_field(form.free_response_sexual_identity, show_help_text_as_label=True, size="s12 m6 select2-wrapper") }} {# TODO: Commenting out the ethnicity section#} {# {{ render_field(form.ethnicity, size="s12 m6 select2-wrapper") }}#} {{ render_field(form.city, size="s12 m6 select2-wrapper added-country-margin formAddTopMargin") }} diff --git a/hackathon_site/registration/migrations/0009_auto_20240914_2258.py b/hackathon_site/registration/migrations/0009_auto_20240914_2334.py similarity index 80% rename from hackathon_site/registration/migrations/0009_auto_20240914_2258.py rename to hackathon_site/registration/migrations/0009_auto_20240914_2334.py index 1468ff8a..8bb2c94f 100644 --- a/hackathon_site/registration/migrations/0009_auto_20240914_2258.py +++ b/hackathon_site/registration/migrations/0009_auto_20240914_2334.py @@ -1,4 +1,4 @@ -# Generated by Django 3.2.15 on 2024-09-15 02:58 +# Generated by Django 3.2.15 on 2024-09-15 03:34 from django.db import migrations, models @@ -61,6 +61,17 @@ class Migration(migrations.Migration): null=True, ), ), + migrations.AddField( + model_name="application", + name="free_response_sexual_identity", + field=models.CharField( + blank=True, + default="", + help_text="If you selected 'Different Identity', please specify.", + max_length=100, + null=True, + ), + ), migrations.AddField( model_name="application", name="gender", @@ -77,6 +88,23 @@ class Migration(migrations.Migration): max_length=50, ), ), + migrations.AddField( + model_name="application", + name="sexual_identity", + field=models.CharField( + choices=[ + (None, ""), + ("heterosexual-or-straight", "Heterosexual or straight"), + ("gay-or-lesbian", "Gay or lesbian"), + ("bisexual", "Bisexual"), + ("different-identity", "Different Identity"), + ("prefer-to-not-answer", "Prefer to not Answer"), + ], + default="", + help_text="Do you consider yourself to be any of the following?", + max_length=50, + ), + ), migrations.AddField( model_name="application", name="tshirt_size", diff --git a/hackathon_site/registration/models.py b/hackathon_site/registration/models.py index ef09f009..4a6ead24 100644 --- a/hackathon_site/registration/models.py +++ b/hackathon_site/registration/models.py @@ -86,6 +86,16 @@ class Application(models.Model): ("unsure", "Unsure"), ] + # TODO: Adding a SEXUAL_IDENTITY choices + SEXUAL_IDENTITY_CHOICES = [ + (None, ""), + ("heterosexual-or-straight", "Heterosexual or straight"), + ("gay-or-lesbian", "Gay or lesbian"), + ("bisexual", "Bisexual"), + ("different-identity", "Different Identity"), + ("prefer-to-not-answer", "Prefer to not Answer"), + ] + STUDY_LEVEL_CHOICES = [ (None, ""), ("less-than-secondary", "Less than Secondary / High School"), @@ -195,6 +205,24 @@ class Application(models.Model): help_text="Are you in an underrepresented group in tech?", ) + # TODO: Adding a "sexual_identity" section + sexual_identity = models.CharField( + max_length=50, + choices=SEXUAL_IDENTITY_CHOICES, + null=False, + default="", + help_text="Do you consider yourself to be any of the following?", + ) + + # TODO: New section to allow people to specify sexual identity identification (if selected "Different Identity") + free_response_sexual_identity = models.CharField( + max_length=100, + null=True, + blank=True, + default="", + help_text="If you selected 'Different Identity', please specify.", + ) + school = models.CharField(max_length=255, null=False) study_level = models.CharField( max_length=50, From 88bee1328c24d95ecff9eaf42554d1ae63e9c967 Mon Sep 17 00:00:00 2001 From: carmen-chau Date: Sun, 15 Sep 2024 00:26:31 -0400 Subject: [PATCH 17/32] added highest former education --- hackathon_site/registration/forms.py | 21 ++++++++ .../jinja2/registration/application.html | 15 ++++-- ...914_2334.py => 0009_auto_20240915_0015.py} | 49 ++++++++++++++++++- hackathon_site/registration/models.py | 41 ++++++++++++++++ 4 files changed, 120 insertions(+), 6 deletions(-) rename hackathon_site/registration/migrations/{0009_auto_20240914_2334.py => 0009_auto_20240915_0015.py} (74%) diff --git a/hackathon_site/registration/forms.py b/hackathon_site/registration/forms.py index 36f0e0e0..b90c74e9 100644 --- a/hackathon_site/registration/forms.py +++ b/hackathon_site/registration/forms.py @@ -135,6 +135,8 @@ class Meta: "under_represented_group", # TODO: New Section "sexual_identity", # TODO: New Section "free_response_sexual_identity", # TODO: New Section + "highest_former_education", # TODO: New Section + "free_response_highest_formal_education", # TODO: New Section "school", "study_level", "graduation_year", @@ -212,6 +214,8 @@ def clean(self): self.handle_free_response_dietary_restrictions() # TODO: New line self.handle_free_response_sexual_identity() + # TODO: New line + self.handle_highest_formal_education() return cleaned_data def clean_age(self): @@ -282,6 +286,23 @@ def handle_free_response_sexual_identity(self): code="free_response_sexual_identity", ) + # TODO: Wrote a new validator for the field "highest_formal_education" + def handle_highest_formal_education(self): + user_highest_formal_education = self.cleaned_data["highest_former_education"] + user_free_response_highest_formal_education = self.cleaned_data[ + "free_response_highest_formal_education" + ] + if ( + user_highest_formal_education == "other" + and not user_free_response_highest_formal_education + ): + raise forms.ValidationError( + _( + "You've selected 'Other' for education, please elaborate in the corresponding field." + ), + code="free_response_highest_formal_education", + ) + def save(self, commit=True): self.instance = super().save(commit=False) team = Team.objects.create() diff --git a/hackathon_site/registration/jinja2/registration/application.html b/hackathon_site/registration/jinja2/registration/application.html index 2aba727b..dc317c9e 100644 --- a/hackathon_site/registration/jinja2/registration/application.html +++ b/hackathon_site/registration/jinja2/registration/application.html @@ -54,12 +54,16 @@

Personal Information

{{ render_field(form.country, size="s12 m6 select2-wrapper added-country-margin formAddTopMargin") }} {# TODO: New section for T-shirt size#} {{ render_field(form.tshirt_size, size="s12 m6 select2-wrapper") }} + {# TODO: New entry for under-represented group#} + {{ render_field(form.under_represented_group, show_help_text_as_label=True, size="s12 m6 select2-wrapper") }} {# TODO: New section for dietary restrictions#} {{ render_field(form.dietary_restrictions, size="s12 m6 select2-wrapper") }} {# TODO: New entry for free response dietary restriction section#} {{ render_field(form.free_response_dietary_restrictions, show_help_text_as_label=True, size="s12 m6 select2-wrapper") }} - {# TODO: New entry for under-represented group#} - {{ render_field(form.under_represented_group, show_help_text_as_label=True, size="s12 m6 select2-wrapper") }} + {# TODO: New entry for highest former education#} + {{ render_field(form.highest_former_education, show_help_text_as_label=True, size="s12 m6 select2-wrapper") }} + {# TODO: New entry for free response highest former education#} + {{ render_field(form.free_response_highest_formal_education, show_help_text_as_label=True, size="s12 m6 select2-wrapper") }}

Education

@@ -97,10 +101,11 @@

Questions

{% block form_button %}
-

You cannot edit this afterwards!

+

Please note: After submission, you will no longer be able to edit your answers!


-

At present, this submission is intended for preregistration. Rest assured, we will notify you via email as soon as official registration becomes available. -

+

For the long answer questions, we recommended writing your answer in a separate document first, then pasting it into the form.

+{#

At present, this submission is intended for preregistration. Rest assured, we will notify you via email as soon as official registration becomes available.#} +{#

#}
diff --git a/hackathon_site/registration/migrations/0009_auto_20240914_2334.py b/hackathon_site/registration/migrations/0009_auto_20240915_0015.py similarity index 74% rename from hackathon_site/registration/migrations/0009_auto_20240914_2334.py rename to hackathon_site/registration/migrations/0009_auto_20240915_0015.py index 8bb2c94f..fdbce1e9 100644 --- a/hackathon_site/registration/migrations/0009_auto_20240914_2334.py +++ b/hackathon_site/registration/migrations/0009_auto_20240915_0015.py @@ -1,4 +1,4 @@ -# Generated by Django 3.2.15 on 2024-09-15 03:34 +# Generated by Django 3.2.15 on 2024-09-15 04:15 from django.db import migrations, models @@ -50,6 +50,17 @@ class Migration(migrations.Migration): null=True, ), ), + migrations.AddField( + model_name="application", + name="free_response_highest_formal_education", + field=models.CharField( + blank=True, + default="", + help_text="If you selected 'Other' for education, please specify.", + max_length=100, + null=True, + ), + ), migrations.AddField( model_name="application", name="free_response_pronouns", @@ -88,6 +99,42 @@ class Migration(migrations.Migration): max_length=50, ), ), + migrations.AddField( + model_name="application", + name="highest_former_education", + field=models.CharField( + choices=[ + (None, ""), + ( + "less-than-secondary-or-high-school", + "Less than Secondary / High School", + ), + ("secondary-or-high-school", "Secondary / High School"), + ( + "post-secondary-2-years", + "2 year Undergraduate University or community college program", + ), + ( + "post-secondary-3-or-more-years", + "3+ year Undergraduate University program", + ), + ( + "graduate-university", + "Graduate University (Masters, Professional, Doctoral, etc)", + ), + ("code-school-or-bootcamp", "Code School / Bootcamp"), + ( + "vocational-or-trades-or-apprenticeship", + "Other Vocational or Trade Program or Apprenticeship", + ), + ("other", "Other"), + ("prefer-to-not-answer", "Prefer to not answer"), + ], + default="", + help_text="What is your highest level of education completed?", + max_length=50, + ), + ), migrations.AddField( model_name="application", name="sexual_identity", diff --git a/hackathon_site/registration/models.py b/hackathon_site/registration/models.py index 4a6ead24..21bafeb7 100644 --- a/hackathon_site/registration/models.py +++ b/hackathon_site/registration/models.py @@ -96,6 +96,29 @@ class Application(models.Model): ("prefer-to-not-answer", "Prefer to not Answer"), ] + # TODO: Adding a HIGHEST_FORMER_EDUCATION choice + HIGHEST_FORMER_EDUCATION_CHOICES = [ + (None, ""), + ("less-than-secondary-or-high-school", "Less than Secondary / High School"), + ("secondary-or-high-school", "Secondary / High School"), + ( + "post-secondary-2-years", + "2 year Undergraduate University or community college program", + ), + ("post-secondary-3-or-more-years", "3+ year Undergraduate University program"), + ( + "graduate-university", + "Graduate University (Masters, Professional, Doctoral, etc)", + ), + ("code-school-or-bootcamp", "Code School / Bootcamp"), + ( + "vocational-or-trades-or-apprenticeship", + "Other Vocational or Trade Program or Apprenticeship", + ), + ("other", "Other"), + ("prefer-to-not-answer", "Prefer to not answer"), + ] + STUDY_LEVEL_CHOICES = [ (None, ""), ("less-than-secondary", "Less than Secondary / High School"), @@ -223,6 +246,24 @@ class Application(models.Model): help_text="If you selected 'Different Identity', please specify.", ) + # TODO: Adding a "highest_former_education" level + highest_former_education = models.CharField( + max_length=50, + choices=HIGHEST_FORMER_EDUCATION_CHOICES, + null=False, + default="", + help_text="What is your highest level of education completed?", + ) + + # TODO: New section to allow people to specify sexual identity identification (if selected "Different Identity") + free_response_highest_formal_education = models.CharField( + max_length=100, + null=True, + blank=True, + default="", + help_text="If you selected 'Other' for education, please specify.", + ) + school = models.CharField(max_length=255, null=False) study_level = models.CharField( max_length=50, From a824698b088c9751a05d024b1726d1844d4e0344 Mon Sep 17 00:00:00 2001 From: carmen-chau Date: Sun, 15 Sep 2024 00:32:04 -0400 Subject: [PATCH 18/32] fixed typo --- hackathon_site/registration/forms.py | 6 +++--- .../registration/jinja2/registration/application.html | 2 +- ...009_auto_20240915_0015.py => 0009_auto_20240915_0029.py} | 4 ++-- hackathon_site/registration/models.py | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) rename hackathon_site/registration/migrations/{0009_auto_20240915_0015.py => 0009_auto_20240915_0029.py} (98%) diff --git a/hackathon_site/registration/forms.py b/hackathon_site/registration/forms.py index b90c74e9..d9288735 100644 --- a/hackathon_site/registration/forms.py +++ b/hackathon_site/registration/forms.py @@ -135,7 +135,7 @@ class Meta: "under_represented_group", # TODO: New Section "sexual_identity", # TODO: New Section "free_response_sexual_identity", # TODO: New Section - "highest_former_education", # TODO: New Section + "highest_formal_education", # TODO: New Section "free_response_highest_formal_education", # TODO: New Section "school", "study_level", @@ -288,7 +288,7 @@ def handle_free_response_sexual_identity(self): # TODO: Wrote a new validator for the field "highest_formal_education" def handle_highest_formal_education(self): - user_highest_formal_education = self.cleaned_data["highest_former_education"] + user_highest_formal_education = self.cleaned_data["highest_formal_education"] user_free_response_highest_formal_education = self.cleaned_data[ "free_response_highest_formal_education" ] @@ -298,7 +298,7 @@ def handle_highest_formal_education(self): ): raise forms.ValidationError( _( - "You've selected 'Other' for education, please elaborate in the corresponding field." + "You've selected 'Other' for highest formal education, please elaborate in the corresponding field." ), code="free_response_highest_formal_education", ) diff --git a/hackathon_site/registration/jinja2/registration/application.html b/hackathon_site/registration/jinja2/registration/application.html index dc317c9e..9d0c8d68 100644 --- a/hackathon_site/registration/jinja2/registration/application.html +++ b/hackathon_site/registration/jinja2/registration/application.html @@ -61,7 +61,7 @@

Personal Information

{# TODO: New entry for free response dietary restriction section#} {{ render_field(form.free_response_dietary_restrictions, show_help_text_as_label=True, size="s12 m6 select2-wrapper") }} {# TODO: New entry for highest former education#} - {{ render_field(form.highest_former_education, show_help_text_as_label=True, size="s12 m6 select2-wrapper") }} + {{ render_field(form.highest_formal_education, show_help_text_as_label=True, size="s12 m6 select2-wrapper") }} {# TODO: New entry for free response highest former education#} {{ render_field(form.free_response_highest_formal_education, show_help_text_as_label=True, size="s12 m6 select2-wrapper") }} diff --git a/hackathon_site/registration/migrations/0009_auto_20240915_0015.py b/hackathon_site/registration/migrations/0009_auto_20240915_0029.py similarity index 98% rename from hackathon_site/registration/migrations/0009_auto_20240915_0015.py rename to hackathon_site/registration/migrations/0009_auto_20240915_0029.py index fdbce1e9..1ae39c98 100644 --- a/hackathon_site/registration/migrations/0009_auto_20240915_0015.py +++ b/hackathon_site/registration/migrations/0009_auto_20240915_0029.py @@ -1,4 +1,4 @@ -# Generated by Django 3.2.15 on 2024-09-15 04:15 +# Generated by Django 3.2.15 on 2024-09-15 04:29 from django.db import migrations, models @@ -101,7 +101,7 @@ class Migration(migrations.Migration): ), migrations.AddField( model_name="application", - name="highest_former_education", + name="highest_formal_education", field=models.CharField( choices=[ (None, ""), diff --git a/hackathon_site/registration/models.py b/hackathon_site/registration/models.py index 21bafeb7..efa13600 100644 --- a/hackathon_site/registration/models.py +++ b/hackathon_site/registration/models.py @@ -247,7 +247,7 @@ class Application(models.Model): ) # TODO: Adding a "highest_former_education" level - highest_former_education = models.CharField( + highest_formal_education = models.CharField( max_length=50, choices=HIGHEST_FORMER_EDUCATION_CHOICES, null=False, From 7d3aea8a2ceee9e7187ba78c4ad1de1708da30f7 Mon Sep 17 00:00:00 2001 From: carmen-chau Date: Tue, 17 Sep 2024 00:51:34 -0400 Subject: [PATCH 19/32] reduced options for curr education --- .../jinja2/registration/application.html | 2 +- ...915_0029.py => 0009_auto_20240917_0048.py} | 26 +++++++++++++++++- hackathon_site/registration/models.py | 27 +++++++++++-------- 3 files changed, 42 insertions(+), 13 deletions(-) rename hackathon_site/registration/migrations/{0009_auto_20240915_0029.py => 0009_auto_20240917_0048.py} (89%) diff --git a/hackathon_site/registration/jinja2/registration/application.html b/hackathon_site/registration/jinja2/registration/application.html index 9d0c8d68..e7baaba6 100644 --- a/hackathon_site/registration/jinja2/registration/application.html +++ b/hackathon_site/registration/jinja2/registration/application.html @@ -69,7 +69,7 @@

Personal Information

Education

{{ render_field(form.school, size="s12 m6 select2-wrapper") }} - {{ render_field(form.study_level, size="s12 m6 select2-wrapper") }} + {{ render_field(form.study_level, show_help_text_as_label=True, size="s12 m6 select2-wrapper") }} {{ render_field(form.graduation_year, size="s12 m6 select2-wrapper") }} {{ render_field(form.program, size="s12 m6 select2-wrapper", show_help_text_as_label=True) }} diff --git a/hackathon_site/registration/migrations/0009_auto_20240915_0029.py b/hackathon_site/registration/migrations/0009_auto_20240917_0048.py similarity index 89% rename from hackathon_site/registration/migrations/0009_auto_20240915_0029.py rename to hackathon_site/registration/migrations/0009_auto_20240917_0048.py index 1ae39c98..48452e09 100644 --- a/hackathon_site/registration/migrations/0009_auto_20240915_0029.py +++ b/hackathon_site/registration/migrations/0009_auto_20240917_0048.py @@ -1,4 +1,4 @@ -# Generated by Django 3.2.15 on 2024-09-15 04:29 +# Generated by Django 3.2.15 on 2024-09-17 04:48 from django.db import migrations, models @@ -213,4 +213,28 @@ class Migration(migrations.Migration): max_length=50, ), ), + migrations.AlterField( + model_name="application", + name="study_level", + field=models.CharField( + choices=[ + (None, ""), + ( + "post-secondary-2-years", + "2 year Undergraduate University or community college program", + ), + ( + "post-secondary-3-or-more-years", + "3+ year Undergraduate University program", + ), + ( + "graduate", + "Graduate University (Masters, Professional, Doctoral, etc)", + ), + ("other", "Other"), + ], + help_text="Current level of study", + max_length=50, + ), + ), ] diff --git a/hackathon_site/registration/models.py b/hackathon_site/registration/models.py index efa13600..44ce069f 100644 --- a/hackathon_site/registration/models.py +++ b/hackathon_site/registration/models.py @@ -121,20 +121,25 @@ class Application(models.Model): STUDY_LEVEL_CHOICES = [ (None, ""), - ("less-than-secondary", "Less than Secondary / High School"), - ("secondary", "Secondary / High School"), + # ("less-than-secondary", "Less than Secondary / High School"), + # ("secondary", "Secondary / High School"), + # ( + # "undergraduate-2-year", + # "Undergraduate University (2 year - community college or similar)", + # ), + # ("undergraduate-3-year", "Undergraduate University (3+ year)"), ( - "undergraduate-2-year", - "Undergraduate University (2 year - community college or similar)", + "post-secondary-2-years", + "2 year Undergraduate University or community college program", ), - ("undergraduate-3-year", "Undergraduate University (3+ year)"), + ("post-secondary-3-or-more-years", "3+ year Undergraduate University program"), ("graduate", "Graduate University (Masters, Professional, Doctoral, etc)"), - ("code-school", "Code School / Bootcamp"), - ("vocational", "Other Vocational / Trade Program or Apprenticeship"), - ("post-doctorate", "Post Doctorate"), + # ("code-school", "Code School / Bootcamp"), + # ("vocational", "Other Vocational / Trade Program or Apprenticeship"), + # ("post-doctorate", "Post Doctorate"), ("other", "Other"), - ("not-a-student", "I’m not currently a student"), - ("no-answer", "Prefer not to answer"), + # ("not-a-student", "I’m not currently a student"), + # ("no-answer", "Prefer not to answer"), ] AGE_CHOICES = [ @@ -267,7 +272,7 @@ class Application(models.Model): school = models.CharField(max_length=255, null=False) study_level = models.CharField( max_length=50, - help_text="Level of Study", + help_text="Current level of study", choices=STUDY_LEVEL_CHOICES, null=False, ) From 803c2f2144f1db45044e4ff4afcceac79f76e07e Mon Sep 17 00:00:00 2001 From: carmen-chau Date: Thu, 19 Sep 2024 23:33:33 -0400 Subject: [PATCH 20/32] added how many hackathons field --- hackathon_site/registration/forms.py | 1 + .../jinja2/registration/application.html | 1 + .../migrations/0009_auto_20240917_0048.py | 240 ------------------ .../migrations/0009_auto_20240919_2329.py | 88 +++++++ hackathon_site/registration/models.py | 19 ++ 5 files changed, 109 insertions(+), 240 deletions(-) delete mode 100644 hackathon_site/registration/migrations/0009_auto_20240917_0048.py create mode 100644 hackathon_site/registration/migrations/0009_auto_20240919_2329.py diff --git a/hackathon_site/registration/forms.py b/hackathon_site/registration/forms.py index d9288735..12851767 100644 --- a/hackathon_site/registration/forms.py +++ b/hackathon_site/registration/forms.py @@ -145,6 +145,7 @@ class Meta: "linkedin", "github", "devpost", + "how_many_hackathons", # TODO: New Section "why_participate", "what_technical_experience", "what_past_experience", diff --git a/hackathon_site/registration/jinja2/registration/application.html b/hackathon_site/registration/jinja2/registration/application.html index e7baaba6..a2b13c15 100644 --- a/hackathon_site/registration/jinja2/registration/application.html +++ b/hackathon_site/registration/jinja2/registration/application.html @@ -84,6 +84,7 @@

Online Profiles

Questions

+ {{ render_field(form.how_many_hackathons, show_help_text_as_label=True, size="s12 select2-wrapper") }} {{ render_field(form.why_participate, show_help_text_as_label=True) }} {{ render_field(form.what_technical_experience, show_help_text_as_label=True) }} {{ render_field(form.what_past_experience, show_help_text_as_label=True) }} diff --git a/hackathon_site/registration/migrations/0009_auto_20240917_0048.py b/hackathon_site/registration/migrations/0009_auto_20240917_0048.py deleted file mode 100644 index 48452e09..00000000 --- a/hackathon_site/registration/migrations/0009_auto_20240917_0048.py +++ /dev/null @@ -1,240 +0,0 @@ -# Generated by Django 3.2.15 on 2024-09-17 04:48 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [("registration", "0008_revert_0007_changes")] - - operations = [ - migrations.AddField( - model_name="application", - name="dietary_restrictions", - field=models.CharField( - choices=[ - (None, ""), - ("none", "None"), - ("halal", "Halal"), - ("vegetarian", "Vegetarian"), - ("vegan", "Vegan"), - ("celiac-disease", "Celiac Disease"), - ("allergies", "Allergies"), - ("kosher", "Kosher"), - ("gluten-free", "Gluten Free"), - ("other", "Other"), - ], - default="", - max_length=50, - ), - ), - migrations.AddField( - model_name="application", - name="free_response_dietary_restrictions", - field=models.CharField( - blank=True, - default="", - help_text="If you selected 'Allergies' or 'Other', please specify.", - max_length=100, - null=True, - ), - ), - migrations.AddField( - model_name="application", - name="free_response_gender", - field=models.CharField( - blank=True, - default="", - help_text="If you selected 'Prefer to Self-Describe', please specify.", - max_length=100, - null=True, - ), - ), - migrations.AddField( - model_name="application", - name="free_response_highest_formal_education", - field=models.CharField( - blank=True, - default="", - help_text="If you selected 'Other' for education, please specify.", - max_length=100, - null=True, - ), - ), - migrations.AddField( - model_name="application", - name="free_response_pronouns", - field=models.CharField( - blank=True, - default="", - help_text="If selected 'Other', please specify", - max_length=100, - null=True, - ), - ), - migrations.AddField( - model_name="application", - name="free_response_sexual_identity", - field=models.CharField( - blank=True, - default="", - help_text="If you selected 'Different Identity', please specify.", - max_length=100, - null=True, - ), - ), - migrations.AddField( - model_name="application", - name="gender", - field=models.CharField( - choices=[ - (None, ""), - ("man", "Man"), - ("woman", "Woman"), - ("non-binary", "Non-Binary"), - ("prefer-to-self-describe", "Prefer to Self-Describe"), - ("prefer-to-not-answer", "Prefer to not Answer"), - ], - default="", - max_length=50, - ), - ), - migrations.AddField( - model_name="application", - name="highest_formal_education", - field=models.CharField( - choices=[ - (None, ""), - ( - "less-than-secondary-or-high-school", - "Less than Secondary / High School", - ), - ("secondary-or-high-school", "Secondary / High School"), - ( - "post-secondary-2-years", - "2 year Undergraduate University or community college program", - ), - ( - "post-secondary-3-or-more-years", - "3+ year Undergraduate University program", - ), - ( - "graduate-university", - "Graduate University (Masters, Professional, Doctoral, etc)", - ), - ("code-school-or-bootcamp", "Code School / Bootcamp"), - ( - "vocational-or-trades-or-apprenticeship", - "Other Vocational or Trade Program or Apprenticeship", - ), - ("other", "Other"), - ("prefer-to-not-answer", "Prefer to not answer"), - ], - default="", - help_text="What is your highest level of education completed?", - max_length=50, - ), - ), - migrations.AddField( - model_name="application", - name="sexual_identity", - field=models.CharField( - choices=[ - (None, ""), - ("heterosexual-or-straight", "Heterosexual or straight"), - ("gay-or-lesbian", "Gay or lesbian"), - ("bisexual", "Bisexual"), - ("different-identity", "Different Identity"), - ("prefer-to-not-answer", "Prefer to not Answer"), - ], - default="", - help_text="Do you consider yourself to be any of the following?", - max_length=50, - ), - ), - migrations.AddField( - model_name="application", - name="tshirt_size", - field=models.CharField( - choices=[(None, ""), ("S", "S"), ("M", "M"), ("L", "L"), ("XL", "XL")], - default="", - max_length=50, - ), - ), - migrations.AddField( - model_name="application", - name="under_represented_group", - field=models.CharField( - choices=[ - (None, ""), - ("yes", "Yes"), - ("no", "No"), - ("unsure", "Unsure"), - ], - default="", - help_text="Are you in an underrepresented group in tech?", - max_length=50, - ), - ), - migrations.AlterField( - model_name="application", - name="ethnicity", - field=models.CharField( - blank=True, - choices=[ - (None, ""), - ("american-native", "American Indian or Alaskan Native"), - ("asian-pacific-islander", "Asian / Pacific Islander"), - ("black-african-american", "Black or African American"), - ("hispanic", "Hispanic"), - ("caucasian", "White / Caucasian"), - ("other", "Multiple ethnicity / Other"), - ("no-answer", "Prefer not to answer"), - ], - max_length=50, - null=True, - ), - ), - migrations.AlterField( - model_name="application", - name="pronouns", - field=models.CharField( - choices=[ - (None, ""), - ("he-him", "he/him"), - ("he-they", "he/they"), - ("she-her", "she/her"), - ("she-they", "she/they"), - ("they-them", "they/them"), - ("other", "other"), - ("no-answer", "prefer not to answer"), - ], - default="", - max_length=50, - ), - ), - migrations.AlterField( - model_name="application", - name="study_level", - field=models.CharField( - choices=[ - (None, ""), - ( - "post-secondary-2-years", - "2 year Undergraduate University or community college program", - ), - ( - "post-secondary-3-or-more-years", - "3+ year Undergraduate University program", - ), - ( - "graduate", - "Graduate University (Masters, Professional, Doctoral, etc)", - ), - ("other", "Other"), - ], - help_text="Current level of study", - max_length=50, - ), - ), - ] diff --git a/hackathon_site/registration/migrations/0009_auto_20240919_2329.py b/hackathon_site/registration/migrations/0009_auto_20240919_2329.py new file mode 100644 index 00000000..ae3e01b4 --- /dev/null +++ b/hackathon_site/registration/migrations/0009_auto_20240919_2329.py @@ -0,0 +1,88 @@ +# Generated by Django 3.2.15 on 2024-09-20 03:29 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('registration', '0008_revert_0007_changes'), + ] + + operations = [ + migrations.AddField( + model_name='application', + name='dietary_restrictions', + field=models.CharField(choices=[(None, ''), ('none', 'None'), ('halal', 'Halal'), ('vegetarian', 'Vegetarian'), ('vegan', 'Vegan'), ('celiac-disease', 'Celiac Disease'), ('allergies', 'Allergies'), ('kosher', 'Kosher'), ('gluten-free', 'Gluten Free'), ('other', 'Other')], default='', max_length=50), + ), + migrations.AddField( + model_name='application', + name='free_response_dietary_restrictions', + field=models.CharField(blank=True, default='', help_text="If you selected 'Allergies' or 'Other', please specify.", max_length=100, null=True), + ), + migrations.AddField( + model_name='application', + name='free_response_gender', + field=models.CharField(blank=True, default='', help_text="If you selected 'Prefer to Self-Describe', please specify.", max_length=100, null=True), + ), + migrations.AddField( + model_name='application', + name='free_response_highest_formal_education', + field=models.CharField(blank=True, default='', help_text="If you selected 'Other' for education, please specify.", max_length=100, null=True), + ), + migrations.AddField( + model_name='application', + name='free_response_pronouns', + field=models.CharField(blank=True, default='', help_text="If selected 'Other', please specify", max_length=100, null=True), + ), + migrations.AddField( + model_name='application', + name='free_response_sexual_identity', + field=models.CharField(blank=True, default='', help_text="If you selected 'Different Identity', please specify.", max_length=100, null=True), + ), + migrations.AddField( + model_name='application', + name='gender', + field=models.CharField(choices=[(None, ''), ('man', 'Man'), ('woman', 'Woman'), ('non-binary', 'Non-Binary'), ('prefer-to-self-describe', 'Prefer to Self-Describe'), ('prefer-to-not-answer', 'Prefer to not Answer')], default='', max_length=50), + ), + migrations.AddField( + model_name='application', + name='highest_formal_education', + field=models.CharField(choices=[(None, ''), ('less-than-secondary-or-high-school', 'Less than Secondary / High School'), ('secondary-or-high-school', 'Secondary / High School'), ('post-secondary-2-years', '2 year Undergraduate University or community college program'), ('post-secondary-3-or-more-years', '3+ year Undergraduate University program'), ('graduate-university', 'Graduate University (Masters, Professional, Doctoral, etc)'), ('code-school-or-bootcamp', 'Code School / Bootcamp'), ('vocational-or-trades-or-apprenticeship', 'Other Vocational or Trade Program or Apprenticeship'), ('other', 'Other'), ('prefer-to-not-answer', 'Prefer to not answer')], default='', help_text='What is your highest level of education completed?', max_length=50), + ), + migrations.AddField( + model_name='application', + name='how_many_hackathons', + field=models.TextField(choices=[(None, ''), ('0', '0'), ('1', '1'), ('2', '2'), ('3', '3'), ('4', '4'), ('5 or more', '5 or more')], default='', help_text='How many hackathons have you been to?', max_length=100), + ), + migrations.AddField( + model_name='application', + name='sexual_identity', + field=models.CharField(choices=[(None, ''), ('heterosexual-or-straight', 'Heterosexual or straight'), ('gay-or-lesbian', 'Gay or lesbian'), ('bisexual', 'Bisexual'), ('different-identity', 'Different Identity'), ('prefer-to-not-answer', 'Prefer to not Answer')], default='', help_text='Do you consider yourself to be any of the following?', max_length=50), + ), + migrations.AddField( + model_name='application', + name='tshirt_size', + field=models.CharField(choices=[(None, ''), ('S', 'S'), ('M', 'M'), ('L', 'L'), ('XL', 'XL')], default='', max_length=50), + ), + migrations.AddField( + model_name='application', + name='under_represented_group', + field=models.CharField(choices=[(None, ''), ('yes', 'Yes'), ('no', 'No'), ('unsure', 'Unsure')], default='', help_text='Are you in an underrepresented group in tech?', max_length=50), + ), + migrations.AlterField( + model_name='application', + name='ethnicity', + field=models.CharField(blank=True, choices=[(None, ''), ('american-native', 'American Indian or Alaskan Native'), ('asian-pacific-islander', 'Asian / Pacific Islander'), ('black-african-american', 'Black or African American'), ('hispanic', 'Hispanic'), ('caucasian', 'White / Caucasian'), ('other', 'Multiple ethnicity / Other'), ('no-answer', 'Prefer not to answer')], max_length=50, null=True), + ), + migrations.AlterField( + model_name='application', + name='pronouns', + field=models.CharField(choices=[(None, ''), ('he-him', 'he/him'), ('he-they', 'he/they'), ('she-her', 'she/her'), ('she-they', 'she/they'), ('they-them', 'they/them'), ('other', 'other'), ('no-answer', 'prefer not to answer')], default='', max_length=50), + ), + migrations.AlterField( + model_name='application', + name='study_level', + field=models.CharField(choices=[(None, ''), ('post-secondary-2-years', '2 year Undergraduate University or community college program'), ('post-secondary-3-or-more-years', '3+ year Undergraduate University program'), ('graduate', 'Graduate University (Masters, Professional, Doctoral, etc)'), ('other', 'Other')], help_text='Current level of study', max_length=50), + ), + ] diff --git a/hackathon_site/registration/models.py b/hackathon_site/registration/models.py index 44ce069f..704c0f9b 100644 --- a/hackathon_site/registration/models.py +++ b/hackathon_site/registration/models.py @@ -152,6 +152,17 @@ class Application(models.Model): (23, "22+"), ] + # TODO: Adding new hackathon number choices + HACKATHON_NUMBER_CHOICES = [ + (None, ""), + ("0", "0"), + ("1", "1"), + ("2", "2"), + ("3", "3"), + ("4", "4"), + ("5 or more", "5 or more"), + ] + user = models.OneToOneField(User, on_delete=models.CASCADE, null=False) team = models.ForeignKey( Team, related_name="applications", on_delete=models.CASCADE, null=False @@ -308,6 +319,14 @@ class Application(models.Model): devpost = models.URLField( max_length=200, help_text="Devpost Profile (Optional)", null=True, blank=True ) + # TODO: New question + how_many_hackathons = models.TextField( + null=False, + default="", + help_text="How many hackathons have you been to?", + choices=HACKATHON_NUMBER_CHOICES, + max_length=100, + ) why_participate = models.TextField( null=False, help_text="Why do you want to participate in NewHacks?", From a6cfa80416bf710f6355a1654592f508d8dbd328 Mon Sep 17 00:00:00 2001 From: carmen-chau Date: Thu, 19 Sep 2024 23:34:18 -0400 Subject: [PATCH 21/32] black changes --- hackathon_site/registration/forms.py | 2 +- .../migrations/0009_auto_20240919_2329.py | 266 ++++++++++++++---- 2 files changed, 219 insertions(+), 49 deletions(-) diff --git a/hackathon_site/registration/forms.py b/hackathon_site/registration/forms.py index 12851767..2c0506e4 100644 --- a/hackathon_site/registration/forms.py +++ b/hackathon_site/registration/forms.py @@ -145,7 +145,7 @@ class Meta: "linkedin", "github", "devpost", - "how_many_hackathons", # TODO: New Section + "how_many_hackathons", # TODO: New Section "why_participate", "what_technical_experience", "what_past_experience", diff --git a/hackathon_site/registration/migrations/0009_auto_20240919_2329.py b/hackathon_site/registration/migrations/0009_auto_20240919_2329.py index ae3e01b4..bcad34db 100644 --- a/hackathon_site/registration/migrations/0009_auto_20240919_2329.py +++ b/hackathon_site/registration/migrations/0009_auto_20240919_2329.py @@ -5,84 +5,254 @@ class Migration(migrations.Migration): - dependencies = [ - ('registration', '0008_revert_0007_changes'), - ] + dependencies = [("registration", "0008_revert_0007_changes")] operations = [ migrations.AddField( - model_name='application', - name='dietary_restrictions', - field=models.CharField(choices=[(None, ''), ('none', 'None'), ('halal', 'Halal'), ('vegetarian', 'Vegetarian'), ('vegan', 'Vegan'), ('celiac-disease', 'Celiac Disease'), ('allergies', 'Allergies'), ('kosher', 'Kosher'), ('gluten-free', 'Gluten Free'), ('other', 'Other')], default='', max_length=50), + model_name="application", + name="dietary_restrictions", + field=models.CharField( + choices=[ + (None, ""), + ("none", "None"), + ("halal", "Halal"), + ("vegetarian", "Vegetarian"), + ("vegan", "Vegan"), + ("celiac-disease", "Celiac Disease"), + ("allergies", "Allergies"), + ("kosher", "Kosher"), + ("gluten-free", "Gluten Free"), + ("other", "Other"), + ], + default="", + max_length=50, + ), ), migrations.AddField( - model_name='application', - name='free_response_dietary_restrictions', - field=models.CharField(blank=True, default='', help_text="If you selected 'Allergies' or 'Other', please specify.", max_length=100, null=True), + model_name="application", + name="free_response_dietary_restrictions", + field=models.CharField( + blank=True, + default="", + help_text="If you selected 'Allergies' or 'Other', please specify.", + max_length=100, + null=True, + ), ), migrations.AddField( - model_name='application', - name='free_response_gender', - field=models.CharField(blank=True, default='', help_text="If you selected 'Prefer to Self-Describe', please specify.", max_length=100, null=True), + model_name="application", + name="free_response_gender", + field=models.CharField( + blank=True, + default="", + help_text="If you selected 'Prefer to Self-Describe', please specify.", + max_length=100, + null=True, + ), ), migrations.AddField( - model_name='application', - name='free_response_highest_formal_education', - field=models.CharField(blank=True, default='', help_text="If you selected 'Other' for education, please specify.", max_length=100, null=True), + model_name="application", + name="free_response_highest_formal_education", + field=models.CharField( + blank=True, + default="", + help_text="If you selected 'Other' for education, please specify.", + max_length=100, + null=True, + ), ), migrations.AddField( - model_name='application', - name='free_response_pronouns', - field=models.CharField(blank=True, default='', help_text="If selected 'Other', please specify", max_length=100, null=True), + model_name="application", + name="free_response_pronouns", + field=models.CharField( + blank=True, + default="", + help_text="If selected 'Other', please specify", + max_length=100, + null=True, + ), ), migrations.AddField( - model_name='application', - name='free_response_sexual_identity', - field=models.CharField(blank=True, default='', help_text="If you selected 'Different Identity', please specify.", max_length=100, null=True), + model_name="application", + name="free_response_sexual_identity", + field=models.CharField( + blank=True, + default="", + help_text="If you selected 'Different Identity', please specify.", + max_length=100, + null=True, + ), ), migrations.AddField( - model_name='application', - name='gender', - field=models.CharField(choices=[(None, ''), ('man', 'Man'), ('woman', 'Woman'), ('non-binary', 'Non-Binary'), ('prefer-to-self-describe', 'Prefer to Self-Describe'), ('prefer-to-not-answer', 'Prefer to not Answer')], default='', max_length=50), + model_name="application", + name="gender", + field=models.CharField( + choices=[ + (None, ""), + ("man", "Man"), + ("woman", "Woman"), + ("non-binary", "Non-Binary"), + ("prefer-to-self-describe", "Prefer to Self-Describe"), + ("prefer-to-not-answer", "Prefer to not Answer"), + ], + default="", + max_length=50, + ), ), migrations.AddField( - model_name='application', - name='highest_formal_education', - field=models.CharField(choices=[(None, ''), ('less-than-secondary-or-high-school', 'Less than Secondary / High School'), ('secondary-or-high-school', 'Secondary / High School'), ('post-secondary-2-years', '2 year Undergraduate University or community college program'), ('post-secondary-3-or-more-years', '3+ year Undergraduate University program'), ('graduate-university', 'Graduate University (Masters, Professional, Doctoral, etc)'), ('code-school-or-bootcamp', 'Code School / Bootcamp'), ('vocational-or-trades-or-apprenticeship', 'Other Vocational or Trade Program or Apprenticeship'), ('other', 'Other'), ('prefer-to-not-answer', 'Prefer to not answer')], default='', help_text='What is your highest level of education completed?', max_length=50), + model_name="application", + name="highest_formal_education", + field=models.CharField( + choices=[ + (None, ""), + ( + "less-than-secondary-or-high-school", + "Less than Secondary / High School", + ), + ("secondary-or-high-school", "Secondary / High School"), + ( + "post-secondary-2-years", + "2 year Undergraduate University or community college program", + ), + ( + "post-secondary-3-or-more-years", + "3+ year Undergraduate University program", + ), + ( + "graduate-university", + "Graduate University (Masters, Professional, Doctoral, etc)", + ), + ("code-school-or-bootcamp", "Code School / Bootcamp"), + ( + "vocational-or-trades-or-apprenticeship", + "Other Vocational or Trade Program or Apprenticeship", + ), + ("other", "Other"), + ("prefer-to-not-answer", "Prefer to not answer"), + ], + default="", + help_text="What is your highest level of education completed?", + max_length=50, + ), ), migrations.AddField( - model_name='application', - name='how_many_hackathons', - field=models.TextField(choices=[(None, ''), ('0', '0'), ('1', '1'), ('2', '2'), ('3', '3'), ('4', '4'), ('5 or more', '5 or more')], default='', help_text='How many hackathons have you been to?', max_length=100), + model_name="application", + name="how_many_hackathons", + field=models.TextField( + choices=[ + (None, ""), + ("0", "0"), + ("1", "1"), + ("2", "2"), + ("3", "3"), + ("4", "4"), + ("5 or more", "5 or more"), + ], + default="", + help_text="How many hackathons have you been to?", + max_length=100, + ), ), migrations.AddField( - model_name='application', - name='sexual_identity', - field=models.CharField(choices=[(None, ''), ('heterosexual-or-straight', 'Heterosexual or straight'), ('gay-or-lesbian', 'Gay or lesbian'), ('bisexual', 'Bisexual'), ('different-identity', 'Different Identity'), ('prefer-to-not-answer', 'Prefer to not Answer')], default='', help_text='Do you consider yourself to be any of the following?', max_length=50), + model_name="application", + name="sexual_identity", + field=models.CharField( + choices=[ + (None, ""), + ("heterosexual-or-straight", "Heterosexual or straight"), + ("gay-or-lesbian", "Gay or lesbian"), + ("bisexual", "Bisexual"), + ("different-identity", "Different Identity"), + ("prefer-to-not-answer", "Prefer to not Answer"), + ], + default="", + help_text="Do you consider yourself to be any of the following?", + max_length=50, + ), ), migrations.AddField( - model_name='application', - name='tshirt_size', - field=models.CharField(choices=[(None, ''), ('S', 'S'), ('M', 'M'), ('L', 'L'), ('XL', 'XL')], default='', max_length=50), + model_name="application", + name="tshirt_size", + field=models.CharField( + choices=[(None, ""), ("S", "S"), ("M", "M"), ("L", "L"), ("XL", "XL")], + default="", + max_length=50, + ), ), migrations.AddField( - model_name='application', - name='under_represented_group', - field=models.CharField(choices=[(None, ''), ('yes', 'Yes'), ('no', 'No'), ('unsure', 'Unsure')], default='', help_text='Are you in an underrepresented group in tech?', max_length=50), + model_name="application", + name="under_represented_group", + field=models.CharField( + choices=[ + (None, ""), + ("yes", "Yes"), + ("no", "No"), + ("unsure", "Unsure"), + ], + default="", + help_text="Are you in an underrepresented group in tech?", + max_length=50, + ), ), migrations.AlterField( - model_name='application', - name='ethnicity', - field=models.CharField(blank=True, choices=[(None, ''), ('american-native', 'American Indian or Alaskan Native'), ('asian-pacific-islander', 'Asian / Pacific Islander'), ('black-african-american', 'Black or African American'), ('hispanic', 'Hispanic'), ('caucasian', 'White / Caucasian'), ('other', 'Multiple ethnicity / Other'), ('no-answer', 'Prefer not to answer')], max_length=50, null=True), + model_name="application", + name="ethnicity", + field=models.CharField( + blank=True, + choices=[ + (None, ""), + ("american-native", "American Indian or Alaskan Native"), + ("asian-pacific-islander", "Asian / Pacific Islander"), + ("black-african-american", "Black or African American"), + ("hispanic", "Hispanic"), + ("caucasian", "White / Caucasian"), + ("other", "Multiple ethnicity / Other"), + ("no-answer", "Prefer not to answer"), + ], + max_length=50, + null=True, + ), ), migrations.AlterField( - model_name='application', - name='pronouns', - field=models.CharField(choices=[(None, ''), ('he-him', 'he/him'), ('he-they', 'he/they'), ('she-her', 'she/her'), ('she-they', 'she/they'), ('they-them', 'they/them'), ('other', 'other'), ('no-answer', 'prefer not to answer')], default='', max_length=50), + model_name="application", + name="pronouns", + field=models.CharField( + choices=[ + (None, ""), + ("he-him", "he/him"), + ("he-they", "he/they"), + ("she-her", "she/her"), + ("she-they", "she/they"), + ("they-them", "they/them"), + ("other", "other"), + ("no-answer", "prefer not to answer"), + ], + default="", + max_length=50, + ), ), migrations.AlterField( - model_name='application', - name='study_level', - field=models.CharField(choices=[(None, ''), ('post-secondary-2-years', '2 year Undergraduate University or community college program'), ('post-secondary-3-or-more-years', '3+ year Undergraduate University program'), ('graduate', 'Graduate University (Masters, Professional, Doctoral, etc)'), ('other', 'Other')], help_text='Current level of study', max_length=50), + model_name="application", + name="study_level", + field=models.CharField( + choices=[ + (None, ""), + ( + "post-secondary-2-years", + "2 year Undergraduate University or community college program", + ), + ( + "post-secondary-3-or-more-years", + "3+ year Undergraduate University program", + ), + ( + "graduate", + "Graduate University (Masters, Professional, Doctoral, etc)", + ), + ("other", "Other"), + ], + help_text="Current level of study", + max_length=50, + ), ), ] From 93e8d43d1b0b5233f31b4bc89cefc702257b9b50 Mon Sep 17 00:00:00 2001 From: carmen-chau Date: Fri, 20 Sep 2024 23:58:36 -0400 Subject: [PATCH 22/32] added new hackathon question, modified ethnicity field --- hackathon_site/registration/forms.py | 8 ++++++++ .../jinja2/registration/application.html | 2 ++ ..._20240919_2329.py => 0009_auto_20240920_2346.py} | 13 +++++++++++-- hackathon_site/registration/models.py | 9 ++++++++- 4 files changed, 29 insertions(+), 3 deletions(-) rename hackathon_site/registration/migrations/{0009_auto_20240919_2329.py => 0009_auto_20240920_2346.py} (95%) diff --git a/hackathon_site/registration/forms.py b/hackathon_site/registration/forms.py index 2c0506e4..56a7cf1a 100644 --- a/hackathon_site/registration/forms.py +++ b/hackathon_site/registration/forms.py @@ -146,6 +146,7 @@ class Meta: "github", "devpost", "how_many_hackathons", # TODO: New Section + "past_hackathon_info", # TODO: New Section "why_participate", "what_technical_experience", "what_past_experience", @@ -161,6 +162,13 @@ class Meta: choices=((None, ""),), ), "resume": MaterialFileInput(), + "past_hackathon_info": forms.Textarea( + attrs={ + "class": "materialize-textarea", + "placeholder": "Insert past hackathon description here...", + "data-length": 1000, + } + ), "why_participate": forms.Textarea( attrs={ "class": "materialize-textarea", diff --git a/hackathon_site/registration/jinja2/registration/application.html b/hackathon_site/registration/jinja2/registration/application.html index a2b13c15..c06e2a70 100644 --- a/hackathon_site/registration/jinja2/registration/application.html +++ b/hackathon_site/registration/jinja2/registration/application.html @@ -85,6 +85,7 @@

Online Profiles

Questions

{{ render_field(form.how_many_hackathons, show_help_text_as_label=True, size="s12 select2-wrapper") }} + {{ render_field(form.past_hackathon_info, show_help_text_as_label=True) }} {{ render_field(form.why_participate, show_help_text_as_label=True) }} {{ render_field(form.what_technical_experience, show_help_text_as_label=True) }} {{ render_field(form.what_past_experience, show_help_text_as_label=True) }} @@ -152,6 +153,7 @@

Questions

e.stopPropagation(); }); }); + $("#id_past_hackathon_info, #id_what_hackathon_experience, #id_why_participate, #id_what_technical_experience").characterCounter(); // TODO: TEMPORARY LINE // on first focus (bubbles up to document), open the menu // https://stackoverflow.com/a/49261426/3882202 diff --git a/hackathon_site/registration/migrations/0009_auto_20240919_2329.py b/hackathon_site/registration/migrations/0009_auto_20240920_2346.py similarity index 95% rename from hackathon_site/registration/migrations/0009_auto_20240919_2329.py rename to hackathon_site/registration/migrations/0009_auto_20240920_2346.py index bcad34db..bf57c606 100644 --- a/hackathon_site/registration/migrations/0009_auto_20240919_2329.py +++ b/hackathon_site/registration/migrations/0009_auto_20240920_2346.py @@ -1,4 +1,4 @@ -# Generated by Django 3.2.15 on 2024-09-20 03:29 +# Generated by Django 3.2.15 on 2024-09-21 03:46 from django.db import migrations, models @@ -153,6 +153,15 @@ class Migration(migrations.Migration): max_length=100, ), ), + migrations.AddField( + model_name="application", + name="past_hackathon_info", + field=models.TextField( + default="", + help_text="If you've been to prior hackathon(s), please indicate the hackathon name, your project name and any prizes you won.", + max_length=1000, + ), + ), migrations.AddField( model_name="application", name="sexual_identity", @@ -209,8 +218,8 @@ class Migration(migrations.Migration): ("other", "Multiple ethnicity / Other"), ("no-answer", "Prefer not to answer"), ], + default="", max_length=50, - null=True, ), ), migrations.AlterField( diff --git a/hackathon_site/registration/models.py b/hackathon_site/registration/models.py index 704c0f9b..02b00dcf 100644 --- a/hackathon_site/registration/models.py +++ b/hackathon_site/registration/models.py @@ -200,7 +200,7 @@ class Application(models.Model): # TODO: Making this ethnicity section OPTIONAL ethnicity = models.CharField( - max_length=50, choices=ETHNICITY_CHOICES, null=True, blank=True + max_length=50, choices=ETHNICITY_CHOICES, null=False, blank=True, default="" ) phone_number = models.CharField( @@ -327,6 +327,13 @@ class Application(models.Model): choices=HACKATHON_NUMBER_CHOICES, max_length=100, ) + # TODO: New field + past_hackathon_info = models.TextField( + null=False, + default="", + help_text="If you've been to prior hackathon(s), please indicate the hackathon name, your project name and any prizes you won.", + max_length=1000, + ) why_participate = models.TextField( null=False, help_text="Why do you want to participate in NewHacks?", From 75d87c79d6a97d7b0f5a10a4b6e994ce17602a5b Mon Sep 17 00:00:00 2001 From: carmen-chau Date: Sat, 21 Sep 2024 00:05:02 -0400 Subject: [PATCH 23/32] modified technical experience question --- hackathon_site/registration/forms.py | 2 +- ...uto_20240920_2346.py => 0009_auto_20240921_0001.py} | 10 +++++++++- hackathon_site/registration/models.py | 2 +- 3 files changed, 11 insertions(+), 3 deletions(-) rename hackathon_site/registration/migrations/{0009_auto_20240920_2346.py => 0009_auto_20240921_0001.py} (96%) diff --git a/hackathon_site/registration/forms.py b/hackathon_site/registration/forms.py index 56a7cf1a..67d2bc44 100644 --- a/hackathon_site/registration/forms.py +++ b/hackathon_site/registration/forms.py @@ -179,7 +179,7 @@ class Meta: "what_technical_experience": forms.Textarea( attrs={ "class": "materialize-textarea", - "placeholder": "My technical experience with software are...", + "placeholder": "My technical experience with software and hardware are...", "data-length": 1000, } ), diff --git a/hackathon_site/registration/migrations/0009_auto_20240920_2346.py b/hackathon_site/registration/migrations/0009_auto_20240921_0001.py similarity index 96% rename from hackathon_site/registration/migrations/0009_auto_20240920_2346.py rename to hackathon_site/registration/migrations/0009_auto_20240921_0001.py index bf57c606..23b25c71 100644 --- a/hackathon_site/registration/migrations/0009_auto_20240920_2346.py +++ b/hackathon_site/registration/migrations/0009_auto_20240921_0001.py @@ -1,4 +1,4 @@ -# Generated by Django 3.2.15 on 2024-09-21 03:46 +# Generated by Django 3.2.15 on 2024-09-21 04:01 from django.db import migrations, models @@ -264,4 +264,12 @@ class Migration(migrations.Migration): max_length=50, ), ), + migrations.AlterField( + model_name="application", + name="what_technical_experience", + field=models.TextField( + help_text="What is your technical experience with software and hardware?", + max_length=1000, + ), + ), ] diff --git a/hackathon_site/registration/models.py b/hackathon_site/registration/models.py index 02b00dcf..3527c043 100644 --- a/hackathon_site/registration/models.py +++ b/hackathon_site/registration/models.py @@ -341,7 +341,7 @@ class Application(models.Model): ) what_technical_experience = models.TextField( null=False, - help_text="What is your technical experience with software?", + help_text="What is your technical experience with software and hardware?", max_length=1000, ) what_past_experience = models.TextField( From 443b803e21efd4820d80d3f40985c6f9590327bc Mon Sep 17 00:00:00 2001 From: carmen-chau Date: Sat, 21 Sep 2024 00:42:17 -0400 Subject: [PATCH 24/32] changed what past experience field --- hackathon_site/registration/forms.py | 13 +++++++------ .../jinja2/registration/application.html | 2 +- ..._20240921_0001.py => 0009_auto_20240921_0033.py} | 10 +++++++++- hackathon_site/registration/models.py | 10 +++++----- 4 files changed, 22 insertions(+), 13 deletions(-) rename hackathon_site/registration/migrations/{0009_auto_20240921_0001.py => 0009_auto_20240921_0033.py} (95%) diff --git a/hackathon_site/registration/forms.py b/hackathon_site/registration/forms.py index 67d2bc44..60b8de5d 100644 --- a/hackathon_site/registration/forms.py +++ b/hackathon_site/registration/forms.py @@ -169,24 +169,25 @@ class Meta: "data-length": 1000, } ), - "why_participate": forms.Textarea( + "what_past_experience": forms.Textarea( attrs={ "class": "materialize-textarea", - "placeholder": "I want to participate in NewHacks because...", + "placeholder": "Insert answer here...", "data-length": 1000, + "style": "padding-top: 38px;", # TODO: Added padding } ), - "what_technical_experience": forms.Textarea( + "why_participate": forms.Textarea( attrs={ "class": "materialize-textarea", - "placeholder": "My technical experience with software and hardware are...", + "placeholder": "I want to participate in NewHacks because...", "data-length": 1000, } ), - "what_past_experience": forms.Textarea( + "what_technical_experience": forms.Textarea( attrs={ "class": "materialize-textarea", - "placeholder": "My past experiences are...", + "placeholder": "My technical experience with software and hardware are...", "data-length": 1000, } ), diff --git a/hackathon_site/registration/jinja2/registration/application.html b/hackathon_site/registration/jinja2/registration/application.html index c06e2a70..3ead9b01 100644 --- a/hackathon_site/registration/jinja2/registration/application.html +++ b/hackathon_site/registration/jinja2/registration/application.html @@ -86,9 +86,9 @@

Questions

{{ render_field(form.how_many_hackathons, show_help_text_as_label=True, size="s12 select2-wrapper") }} {{ render_field(form.past_hackathon_info, show_help_text_as_label=True) }} + {{ render_field(form.what_past_experience, show_help_text_as_label=True) }} {{ render_field(form.why_participate, show_help_text_as_label=True) }} {{ render_field(form.what_technical_experience, show_help_text_as_label=True) }} - {{ render_field(form.what_past_experience, show_help_text_as_label=True) }}

We are currently in the process of partnering with MLH. The following 3 checkboxes are for this partnership. If we do not end up partnering with MLH, your information will not be shared.

diff --git a/hackathon_site/registration/migrations/0009_auto_20240921_0001.py b/hackathon_site/registration/migrations/0009_auto_20240921_0033.py similarity index 95% rename from hackathon_site/registration/migrations/0009_auto_20240921_0001.py rename to hackathon_site/registration/migrations/0009_auto_20240921_0033.py index 23b25c71..b1f884da 100644 --- a/hackathon_site/registration/migrations/0009_auto_20240921_0001.py +++ b/hackathon_site/registration/migrations/0009_auto_20240921_0033.py @@ -1,4 +1,4 @@ -# Generated by Django 3.2.15 on 2024-09-21 04:01 +# Generated by Django 3.2.15 on 2024-09-21 04:33 from django.db import migrations, models @@ -264,6 +264,14 @@ class Migration(migrations.Migration): max_length=50, ), ), + migrations.AlterField( + model_name="application", + name="what_past_experience", + field=models.TextField( + help_text="If you’ve been to a hackathon, what is your most memorable moment or challenge you faced? How did you overcome it? If not, what excites you most about attending your first hackathon and what do you hope to achieve and experience?", + max_length=1000, + ), + ), migrations.AlterField( model_name="application", name="what_technical_experience", diff --git a/hackathon_site/registration/models.py b/hackathon_site/registration/models.py index 3527c043..d1bb7a48 100644 --- a/hackathon_site/registration/models.py +++ b/hackathon_site/registration/models.py @@ -334,6 +334,11 @@ class Application(models.Model): help_text="If you've been to prior hackathon(s), please indicate the hackathon name, your project name and any prizes you won.", max_length=1000, ) + what_past_experience = models.TextField( + null=False, + help_text="If you’ve been to a hackathon, what is your most memorable moment or challenge you faced? How did you overcome it? If not, what excites you most about attending your first hackathon and what do you hope to achieve and experience?", + max_length=1000, + ) why_participate = models.TextField( null=False, help_text="Why do you want to participate in NewHacks?", @@ -344,11 +349,6 @@ class Application(models.Model): help_text="What is your technical experience with software and hardware?", max_length=1000, ) - what_past_experience = models.TextField( - null=False, - help_text="If you’ve been to a hackathon, briefly tell us your experience. If not, describe what you expect to see and experience.", - max_length=1000, - ) conduct_agree = models.BooleanField( help_text="I have read and agree to the " 'MLH code of conduct.', From 5d07d0fff30aa9a2cdef94f84d8f47ae2b9f3310 Mon Sep 17 00:00:00 2001 From: carmen-chau Date: Sat, 21 Sep 2024 00:57:13 -0400 Subject: [PATCH 25/32] added team role question --- hackathon_site/registration/forms.py | 10 +++++++++- .../registration/jinja2/registration/application.html | 3 ++- ...to_20240921_0033.py => 0009_auto_20240921_0050.py} | 11 ++++++++++- hackathon_site/registration/models.py | 7 +++++++ 4 files changed, 28 insertions(+), 3 deletions(-) rename hackathon_site/registration/migrations/{0009_auto_20240921_0033.py => 0009_auto_20240921_0050.py} (96%) diff --git a/hackathon_site/registration/forms.py b/hackathon_site/registration/forms.py index 60b8de5d..51887ce1 100644 --- a/hackathon_site/registration/forms.py +++ b/hackathon_site/registration/forms.py @@ -147,9 +147,10 @@ class Meta: "devpost", "how_many_hackathons", # TODO: New Section "past_hackathon_info", # TODO: New Section + "what_past_experience", "why_participate", "what_technical_experience", - "what_past_experience", + "what_role_in_team_setting", "conduct_agree", "logistics_agree", "email_agree", @@ -191,6 +192,13 @@ class Meta: "data-length": 1000, } ), + "what_role_in_team_setting": forms.Textarea( + attrs={ + "class": "materialize-textarea", + "placeholder": "I take on the role of...", + "data-length": 1000, + } + ), "phone_number": forms.TextInput(attrs={"placeholder": "+1 (123) 456-7890"}), "graduation_year": forms.NumberInput(attrs={"placeholder": 2023}), } diff --git a/hackathon_site/registration/jinja2/registration/application.html b/hackathon_site/registration/jinja2/registration/application.html index 3ead9b01..de03cbc4 100644 --- a/hackathon_site/registration/jinja2/registration/application.html +++ b/hackathon_site/registration/jinja2/registration/application.html @@ -89,6 +89,7 @@

Questions

{{ render_field(form.what_past_experience, show_help_text_as_label=True) }} {{ render_field(form.why_participate, show_help_text_as_label=True) }} {{ render_field(form.what_technical_experience, show_help_text_as_label=True) }} + {{ render_field(form.what_role_in_team_setting, show_help_text_as_label=True) }}

We are currently in the process of partnering with MLH. The following 3 checkboxes are for this partnership. If we do not end up partnering with MLH, your information will not be shared.

@@ -153,7 +154,7 @@

Questions

e.stopPropagation(); }); }); - $("#id_past_hackathon_info, #id_what_hackathon_experience, #id_why_participate, #id_what_technical_experience").characterCounter(); // TODO: TEMPORARY LINE + $("#id_what_role_in_team_setting, #id_past_hackathon_info, #id_what_hackathon_experience, #id_why_participate, #id_what_technical_experience").characterCounter(); // TODO: TEMPORARY LINE // on first focus (bubbles up to document), open the menu // https://stackoverflow.com/a/49261426/3882202 diff --git a/hackathon_site/registration/migrations/0009_auto_20240921_0033.py b/hackathon_site/registration/migrations/0009_auto_20240921_0050.py similarity index 96% rename from hackathon_site/registration/migrations/0009_auto_20240921_0033.py rename to hackathon_site/registration/migrations/0009_auto_20240921_0050.py index b1f884da..ba6d6143 100644 --- a/hackathon_site/registration/migrations/0009_auto_20240921_0033.py +++ b/hackathon_site/registration/migrations/0009_auto_20240921_0050.py @@ -1,4 +1,4 @@ -# Generated by Django 3.2.15 on 2024-09-21 04:33 +# Generated by Django 3.2.15 on 2024-09-21 04:50 from django.db import migrations, models @@ -203,6 +203,15 @@ class Migration(migrations.Migration): max_length=50, ), ), + migrations.AddField( + model_name="application", + name="what_role_in_team_setting", + field=models.TextField( + default="", + help_text="What role do you typically take on in a team setting? Give an example of how you contributed to team success.", + max_length=1000, + ), + ), migrations.AlterField( model_name="application", name="ethnicity", diff --git a/hackathon_site/registration/models.py b/hackathon_site/registration/models.py index d1bb7a48..88e3e105 100644 --- a/hackathon_site/registration/models.py +++ b/hackathon_site/registration/models.py @@ -349,6 +349,13 @@ class Application(models.Model): help_text="What is your technical experience with software and hardware?", max_length=1000, ) + # TODO: New Field + what_role_in_team_setting = models.TextField( + null=False, + default="", + help_text="What role do you typically take on in a team setting? Give an example of how you contributed to team success.", + max_length=1000, + ) conduct_agree = models.BooleanField( help_text="I have read and agree to the " 'MLH code of conduct.', From 046f4e659305018a502110b75414dab0bb7bc958 Mon Sep 17 00:00:00 2001 From: carmen-chau Date: Sat, 21 Sep 2024 15:54:35 -0400 Subject: [PATCH 26/32] added discover method, made word count bigger for personal info --- hackathon_site/registration/forms.py | 16 ++++++++ .../jinja2/registration/application.html | 3 +- ...921_0050.py => 0009_auto_20240921_1547.py} | 40 ++++++++++++++----- hackathon_site/registration/models.py | 38 +++++++++++++----- 4 files changed, 75 insertions(+), 22 deletions(-) rename hackathon_site/registration/migrations/{0009_auto_20240921_0050.py => 0009_auto_20240921_1547.py} (91%) diff --git a/hackathon_site/registration/forms.py b/hackathon_site/registration/forms.py index 51887ce1..94e75ec6 100644 --- a/hackathon_site/registration/forms.py +++ b/hackathon_site/registration/forms.py @@ -151,6 +151,7 @@ class Meta: "why_participate", "what_technical_experience", "what_role_in_team_setting", + "discovery_method", # TODO: New Section "conduct_agree", "logistics_agree", "email_agree", @@ -163,6 +164,21 @@ class Meta: choices=((None, ""),), ), "resume": MaterialFileInput(), + "free_response_pronouns": forms.Textarea( + attrs={"class": "materialize-textarea", "data-length": 200} + ), + "free_response_gender": forms.Textarea( + attrs={"class": "materialize-textarea", "data-length": 200} + ), + "free_response_sexual_identity": forms.Textarea( + attrs={"class": "materialize-textarea", "data-length": 200} + ), + "free_response_dietary_restrictions": forms.Textarea( + attrs={"class": "materialize-textarea", "data-length": 200} + ), + "free_response_highest_formal_education": forms.Textarea( + attrs={"class": "materialize-textarea", "data-length": 200} + ), "past_hackathon_info": forms.Textarea( attrs={ "class": "materialize-textarea", diff --git a/hackathon_site/registration/jinja2/registration/application.html b/hackathon_site/registration/jinja2/registration/application.html index de03cbc4..db3c3204 100644 --- a/hackathon_site/registration/jinja2/registration/application.html +++ b/hackathon_site/registration/jinja2/registration/application.html @@ -90,6 +90,7 @@

Questions

{{ render_field(form.why_participate, show_help_text_as_label=True) }} {{ render_field(form.what_technical_experience, show_help_text_as_label=True) }} {{ render_field(form.what_role_in_team_setting, show_help_text_as_label=True) }} + {{ render_field(form.discovery_method, show_help_text_as_label=True, size="s12 select2-wrapper") }}

We are currently in the process of partnering with MLH. The following 3 checkboxes are for this partnership. If we do not end up partnering with MLH, your information will not be shared.

@@ -154,7 +155,7 @@

Questions

e.stopPropagation(); }); }); - $("#id_what_role_in_team_setting, #id_past_hackathon_info, #id_what_hackathon_experience, #id_why_participate, #id_what_technical_experience").characterCounter(); // TODO: TEMPORARY LINE + $("#id_free_response_pronouns, #id_free_response_gender, #id_free_response_sexual_identity, #id_free_response_dietary_restrictions, #id_free_response_highest_formal_education, #id_what_role_in_team_setting, #id_past_hackathon_info, #id_what_hackathon_experience, #id_why_participate, #id_what_technical_experience").characterCounter(); // TODO: TEMPORARY LINE // on first focus (bubbles up to document), open the menu // https://stackoverflow.com/a/49261426/3882202 diff --git a/hackathon_site/registration/migrations/0009_auto_20240921_0050.py b/hackathon_site/registration/migrations/0009_auto_20240921_1547.py similarity index 91% rename from hackathon_site/registration/migrations/0009_auto_20240921_0050.py rename to hackathon_site/registration/migrations/0009_auto_20240921_1547.py index ba6d6143..ba15153d 100644 --- a/hackathon_site/registration/migrations/0009_auto_20240921_0050.py +++ b/hackathon_site/registration/migrations/0009_auto_20240921_1547.py @@ -1,4 +1,4 @@ -# Generated by Django 3.2.15 on 2024-09-21 04:50 +# Generated by Django 3.2.15 on 2024-09-21 19:47 from django.db import migrations, models @@ -28,58 +28,76 @@ class Migration(migrations.Migration): max_length=50, ), ), + migrations.AddField( + model_name="application", + name="discovery_method", + field=models.TextField( + choices=[ + (None, ""), + ("instagram", "Instagram"), + ("in class/from a professor", "In Class/From a professor"), + ("discord", "Discord"), + ("email", "Email"), + ("from a friend", "From a friend"), + ("other", "Other"), + ], + default="", + help_text="How did you hear about NewHacks?", + max_length=100, + ), + ), migrations.AddField( model_name="application", name="free_response_dietary_restrictions", - field=models.CharField( + field=models.TextField( blank=True, default="", help_text="If you selected 'Allergies' or 'Other', please specify.", - max_length=100, + max_length=200, null=True, ), ), migrations.AddField( model_name="application", name="free_response_gender", - field=models.CharField( + field=models.TextField( blank=True, default="", help_text="If you selected 'Prefer to Self-Describe', please specify.", - max_length=100, + max_length=200, null=True, ), ), migrations.AddField( model_name="application", name="free_response_highest_formal_education", - field=models.CharField( + field=models.TextField( blank=True, default="", help_text="If you selected 'Other' for education, please specify.", - max_length=100, + max_length=200, null=True, ), ), migrations.AddField( model_name="application", name="free_response_pronouns", - field=models.CharField( + field=models.TextField( blank=True, default="", help_text="If selected 'Other', please specify", - max_length=100, + max_length=200, null=True, ), ), migrations.AddField( model_name="application", name="free_response_sexual_identity", - field=models.CharField( + field=models.TextField( blank=True, default="", help_text="If you selected 'Different Identity', please specify.", - max_length=100, + max_length=200, null=True, ), ), diff --git a/hackathon_site/registration/models.py b/hackathon_site/registration/models.py index 88e3e105..923f5f19 100644 --- a/hackathon_site/registration/models.py +++ b/hackathon_site/registration/models.py @@ -162,6 +162,16 @@ class Application(models.Model): ("4", "4"), ("5 or more", "5 or more"), ] + # TODO: Adding new discovery choices + REFERRAL_CHOICES = [ + (None, ""), + ("instagram", "Instagram"), + ("in class/from a professor", "In Class/From a professor"), + ("discord", "Discord"), + ("email", "Email"), + ("from a friend", "From a friend"), + ("other", "Other"), + ] user = models.OneToOneField(User, on_delete=models.CASCADE, null=False) team = models.ForeignKey( @@ -176,8 +186,8 @@ class Application(models.Model): ) # TODO: New section to allow people to specify pronouns (if selected "Other") - free_response_pronouns = models.CharField( - max_length=100, + free_response_pronouns = models.TextField( + max_length=200, null=True, blank=True, default="", @@ -190,8 +200,8 @@ class Application(models.Model): ) # TODO: New section to allow people to specify gender identification (if selected "Prefer to Self-Describe") - free_response_gender = models.CharField( - max_length=100, + free_response_gender = models.TextField( + max_length=200, null=True, blank=True, default="", @@ -227,8 +237,8 @@ class Application(models.Model): ) # TODO: New section to allow people to clarify dietary restrictions if selected "Other" or "Allergies - free_response_dietary_restrictions = models.CharField( - max_length=100, + free_response_dietary_restrictions = models.TextField( + max_length=200, null=True, blank=True, default="", @@ -254,8 +264,8 @@ class Application(models.Model): ) # TODO: New section to allow people to specify sexual identity identification (if selected "Different Identity") - free_response_sexual_identity = models.CharField( - max_length=100, + free_response_sexual_identity = models.TextField( + max_length=200, null=True, blank=True, default="", @@ -272,8 +282,8 @@ class Application(models.Model): ) # TODO: New section to allow people to specify sexual identity identification (if selected "Different Identity") - free_response_highest_formal_education = models.CharField( - max_length=100, + free_response_highest_formal_education = models.TextField( + max_length=200, null=True, blank=True, default="", @@ -356,6 +366,14 @@ class Application(models.Model): help_text="What role do you typically take on in a team setting? Give an example of how you contributed to team success.", max_length=1000, ) + # TODO: New Field + discovery_method = models.TextField( + null=False, + default="", + help_text="How did you hear about NewHacks?", + choices=REFERRAL_CHOICES, + max_length=100, + ) conduct_agree = models.BooleanField( help_text="I have read and agree to the " 'MLH code of conduct.', From c31d8439251c0ec73596c19481180650054c92ec Mon Sep 17 00:00:00 2001 From: carmen-chau Date: Wed, 25 Sep 2024 00:51:36 -0400 Subject: [PATCH 27/32] removed comments --- hackathon_site/registration/forms.py | 6 +----- ...009_auto_20240921_1547.py => 0009_auto_20240925_0047.py} | 2 +- hackathon_site/registration/models.py | 3 --- 3 files changed, 2 insertions(+), 9 deletions(-) rename hackathon_site/registration/migrations/{0009_auto_20240921_1547.py => 0009_auto_20240925_0047.py} (99%) diff --git a/hackathon_site/registration/forms.py b/hackathon_site/registration/forms.py index 94e75ec6..339f01c4 100644 --- a/hackathon_site/registration/forms.py +++ b/hackathon_site/registration/forms.py @@ -122,7 +122,7 @@ class Meta: fields = [ "age", "pronouns", - "free_response_pronouns", # TODO: New Section + "free_response_pronouns", "gender", # TODO : New Section "free_response_gender", # TODO : New Section # "ethnicity", # TODO: Commenting out this section @@ -237,10 +237,7 @@ def clean(self): raise forms.ValidationError( _("User has already submitted an application."), code="invalid" ) - - # TODO: New line (calling an existing method that was never called.... for some reason?) self.clean_age() - # TODO: New line self.handle_free_response_pronouns() # TODO: New line self.handle_free_response_gender() @@ -264,7 +261,6 @@ def clean_age(self): ) return user_age - # TODO: Wrote a new validator for the field "free_response_pronouns" def handle_free_response_pronouns(self): user_pronouns = self.cleaned_data["pronouns"] user_free_response_pronouns = self.cleaned_data["free_response_pronouns"] diff --git a/hackathon_site/registration/migrations/0009_auto_20240921_1547.py b/hackathon_site/registration/migrations/0009_auto_20240925_0047.py similarity index 99% rename from hackathon_site/registration/migrations/0009_auto_20240921_1547.py rename to hackathon_site/registration/migrations/0009_auto_20240925_0047.py index ba15153d..6b444ab7 100644 --- a/hackathon_site/registration/migrations/0009_auto_20240921_1547.py +++ b/hackathon_site/registration/migrations/0009_auto_20240925_0047.py @@ -1,4 +1,4 @@ -# Generated by Django 3.2.15 on 2024-09-21 19:47 +# Generated by Django 3.2.15 on 2024-09-25 04:47 from django.db import migrations, models diff --git a/hackathon_site/registration/models.py b/hackathon_site/registration/models.py index 923f5f19..0c33efc6 100644 --- a/hackathon_site/registration/models.py +++ b/hackathon_site/registration/models.py @@ -28,7 +28,6 @@ def __str__(self): class Application(models.Model): - # TODO: Added 2 new pronoun choices here PRONOUN_CHOICES = [ (None, ""), ("he-him", "he/him"), @@ -184,8 +183,6 @@ class Application(models.Model): pronouns = models.CharField( max_length=50, choices=PRONOUN_CHOICES, null=False, default="" ) - - # TODO: New section to allow people to specify pronouns (if selected "Other") free_response_pronouns = models.TextField( max_length=200, null=True, From c46529b34e32a9f5a0723d68744af38d95ca48a4 Mon Sep 17 00:00:00 2001 From: carmen-chau Date: Wed, 25 Sep 2024 00:57:00 -0400 Subject: [PATCH 28/32] more comment deletion --- hackathon_site/registration/forms.py | 6 ++---- .../registration/jinja2/registration/application.html | 3 --- ...009_auto_20240925_0047.py => 0009_auto_20240925_0056.py} | 2 +- hackathon_site/registration/models.py | 4 ---- 4 files changed, 3 insertions(+), 12 deletions(-) rename hackathon_site/registration/migrations/{0009_auto_20240925_0047.py => 0009_auto_20240925_0056.py} (99%) diff --git a/hackathon_site/registration/forms.py b/hackathon_site/registration/forms.py index 339f01c4..de9fdc0e 100644 --- a/hackathon_site/registration/forms.py +++ b/hackathon_site/registration/forms.py @@ -123,8 +123,8 @@ class Meta: "age", "pronouns", "free_response_pronouns", - "gender", # TODO : New Section - "free_response_gender", # TODO : New Section + "gender", + "free_response_gender", # "ethnicity", # TODO: Commenting out this section "phone_number", "city", @@ -239,7 +239,6 @@ def clean(self): ) self.clean_age() self.handle_free_response_pronouns() - # TODO: New line self.handle_free_response_gender() # TODO: New line self.handle_free_response_dietary_restrictions() @@ -272,7 +271,6 @@ def handle_free_response_pronouns(self): code="free_response_pronouns", ) - # TODO: Wrote a new validator for the field "free_response_gender" def handle_free_response_gender(self): user_gender = self.cleaned_data["gender"] user_free_response_gender = self.cleaned_data["free_response_gender"] diff --git a/hackathon_site/registration/jinja2/registration/application.html b/hackathon_site/registration/jinja2/registration/application.html index db3c3204..dd0d85cd 100644 --- a/hackathon_site/registration/jinja2/registration/application.html +++ b/hackathon_site/registration/jinja2/registration/application.html @@ -38,11 +38,8 @@

Personal Information

{{ render_field(form.age, size="s12 m6 select2-wrapper") }} {{ render_field(form.phone_number, size="s12 m6") }} {{ render_field(form.pronouns, size="s12 m6 select2-wrapper") }} - {# TODO: New entry for free response pronoun section#} {{ render_field(form.free_response_pronouns, show_help_text_as_label=True, size="s12 m6 select2-wrapper") }} - {# TODO: New entry for gender section#} {{ render_field(form.gender, size="s12 m6 select2-wrapper") }} - {# TODO: New entry for free response gender section#} {{ render_field(form.free_response_gender, show_help_text_as_label=True, size="s12 m6 select2-wrapper") }} {# TODO: New entry for sexual identity section#} {{ render_field(form.sexual_identity, show_help_text_as_label=True, size="s12 m6 select2-wrapper") }} diff --git a/hackathon_site/registration/migrations/0009_auto_20240925_0047.py b/hackathon_site/registration/migrations/0009_auto_20240925_0056.py similarity index 99% rename from hackathon_site/registration/migrations/0009_auto_20240925_0047.py rename to hackathon_site/registration/migrations/0009_auto_20240925_0056.py index 6b444ab7..38d58b5c 100644 --- a/hackathon_site/registration/migrations/0009_auto_20240925_0047.py +++ b/hackathon_site/registration/migrations/0009_auto_20240925_0056.py @@ -1,4 +1,4 @@ -# Generated by Django 3.2.15 on 2024-09-25 04:47 +# Generated by Django 3.2.15 on 2024-09-25 04:56 from django.db import migrations, models diff --git a/hackathon_site/registration/models.py b/hackathon_site/registration/models.py index 0c33efc6..3997dcb5 100644 --- a/hackathon_site/registration/models.py +++ b/hackathon_site/registration/models.py @@ -38,8 +38,6 @@ class Application(models.Model): ("other", "other"), ("no-answer", "prefer not to answer"), ] - - # TODO: Added a new field (Gender) here GENDER_CHOICES = [ (None, ""), ("man", "Man"), @@ -190,8 +188,6 @@ class Application(models.Model): default="", help_text="If selected 'Other', please specify", ) - - # TODO: New section for "Gender" dropdown gender = models.CharField( max_length=50, choices=GENDER_CHOICES, null=False, default="" ) From 4d8d3eb019e2e56b1dc9797a91defad6a6c301e3 Mon Sep 17 00:00:00 2001 From: carmen-chau Date: Wed, 25 Sep 2024 01:02:39 -0400 Subject: [PATCH 29/32] removing more comments --- hackathon_site/registration/forms.py | 4 ++-- .../registration/jinja2/registration/application.html | 2 -- ...{0009_auto_20240925_0056.py => 0009_auto_20240925_0059.py} | 2 +- hackathon_site/registration/models.py | 4 ---- 4 files changed, 3 insertions(+), 9 deletions(-) rename hackathon_site/registration/migrations/{0009_auto_20240925_0056.py => 0009_auto_20240925_0059.py} (99%) diff --git a/hackathon_site/registration/forms.py b/hackathon_site/registration/forms.py index de9fdc0e..25b94ed6 100644 --- a/hackathon_site/registration/forms.py +++ b/hackathon_site/registration/forms.py @@ -129,10 +129,10 @@ class Meta: "phone_number", "city", "country", - "tshirt_size", # TODO: New Section + "tshirt_size", "dietary_restrictions", # TODO: New Section "free_response_dietary_restrictions", # TODO: New Section - "under_represented_group", # TODO: New Section + "under_represented_group", "sexual_identity", # TODO: New Section "free_response_sexual_identity", # TODO: New Section "highest_formal_education", # TODO: New Section diff --git a/hackathon_site/registration/jinja2/registration/application.html b/hackathon_site/registration/jinja2/registration/application.html index dd0d85cd..2bdedbd0 100644 --- a/hackathon_site/registration/jinja2/registration/application.html +++ b/hackathon_site/registration/jinja2/registration/application.html @@ -49,9 +49,7 @@

Personal Information

{# {{ render_field(form.ethnicity, size="s12 m6 select2-wrapper") }}#} {{ render_field(form.city, size="s12 m6 select2-wrapper added-country-margin formAddTopMargin") }} {{ render_field(form.country, size="s12 m6 select2-wrapper added-country-margin formAddTopMargin") }} - {# TODO: New section for T-shirt size#} {{ render_field(form.tshirt_size, size="s12 m6 select2-wrapper") }} - {# TODO: New entry for under-represented group#} {{ render_field(form.under_represented_group, show_help_text_as_label=True, size="s12 m6 select2-wrapper") }} {# TODO: New section for dietary restrictions#} {{ render_field(form.dietary_restrictions, size="s12 m6 select2-wrapper") }} diff --git a/hackathon_site/registration/migrations/0009_auto_20240925_0056.py b/hackathon_site/registration/migrations/0009_auto_20240925_0059.py similarity index 99% rename from hackathon_site/registration/migrations/0009_auto_20240925_0056.py rename to hackathon_site/registration/migrations/0009_auto_20240925_0059.py index 38d58b5c..50f8a603 100644 --- a/hackathon_site/registration/migrations/0009_auto_20240925_0056.py +++ b/hackathon_site/registration/migrations/0009_auto_20240925_0059.py @@ -1,4 +1,4 @@ -# Generated by Django 3.2.15 on 2024-09-25 04:56 +# Generated by Django 3.2.15 on 2024-09-25 04:59 from django.db import migrations, models diff --git a/hackathon_site/registration/models.py b/hackathon_site/registration/models.py index 3997dcb5..e80ab9e6 100644 --- a/hackathon_site/registration/models.py +++ b/hackathon_site/registration/models.py @@ -58,7 +58,6 @@ class Application(models.Model): ("no-answer", "Prefer not to answer"), ] - # TODO: Adding T-shirt choices TSHIRT_SIZE_CHOICES = [(None, ""), ("S", "S"), ("M", "M"), ("L", "L"), ("XL", "XL")] # TODO: Adding dietary restriction choices @@ -75,7 +74,6 @@ class Application(models.Model): ("other", "Other"), ] - # TODO: Adding UNDER_REPRESENTED_GROUP choices UNDER_REPRESENTED_GROUP_CHOICES = [ (None, ""), ("yes", "Yes"), @@ -219,7 +217,6 @@ class Application(models.Model): city = models.CharField(max_length=255, null=False) country = models.CharField(max_length=255, null=False) - # TODO: Adding a "T-shirt" section tshirt_size = models.CharField( max_length=50, choices=TSHIRT_SIZE_CHOICES, null=False, default="" ) @@ -238,7 +235,6 @@ class Application(models.Model): help_text="If you selected 'Allergies' or 'Other', please specify.", ) - # TODO: Adding a "Under-represented group" section under_represented_group = models.CharField( max_length=50, choices=UNDER_REPRESENTED_GROUP_CHOICES, From b40f0197f13fccc4213cc2a2d51e95e001a80d63 Mon Sep 17 00:00:00 2001 From: carmen-chau Date: Wed, 25 Sep 2024 01:24:59 -0400 Subject: [PATCH 30/32] remove comments --- hackathon_site/registration/forms.py | 20 +++++++------------ .../jinja2/registration/application.html | 6 ------ ...925_0059.py => 0009_auto_20240925_0123.py} | 2 +- hackathon_site/registration/models.py | 10 ---------- 4 files changed, 8 insertions(+), 30 deletions(-) rename hackathon_site/registration/migrations/{0009_auto_20240925_0059.py => 0009_auto_20240925_0123.py} (99%) diff --git a/hackathon_site/registration/forms.py b/hackathon_site/registration/forms.py index 25b94ed6..46808cc9 100644 --- a/hackathon_site/registration/forms.py +++ b/hackathon_site/registration/forms.py @@ -130,13 +130,13 @@ class Meta: "city", "country", "tshirt_size", - "dietary_restrictions", # TODO: New Section - "free_response_dietary_restrictions", # TODO: New Section + "dietary_restrictions", + "free_response_dietary_restrictions", "under_represented_group", - "sexual_identity", # TODO: New Section - "free_response_sexual_identity", # TODO: New Section - "highest_formal_education", # TODO: New Section - "free_response_highest_formal_education", # TODO: New Section + "sexual_identity", + "free_response_sexual_identity", + "highest_formal_education", + "free_response_highest_formal_education", "school", "study_level", "graduation_year", @@ -240,11 +240,8 @@ def clean(self): self.clean_age() self.handle_free_response_pronouns() self.handle_free_response_gender() - # TODO: New line - self.handle_free_response_dietary_restrictions() - # TODO: New line self.handle_free_response_sexual_identity() - # TODO: New line + self.handle_free_response_dietary_restrictions() self.handle_highest_formal_education() return cleaned_data @@ -282,7 +279,6 @@ def handle_free_response_gender(self): code="free_response_gender", ) - # TODO: Wrote a new validator for the field "free_response_gender" def handle_free_response_dietary_restrictions(self): user_dietary_restrictions = self.cleaned_data["dietary_restrictions"] user_free_response_dietary_restrictions = self.cleaned_data[ @@ -297,7 +293,6 @@ def handle_free_response_dietary_restrictions(self): code="free_response_dietary_restrictions", ) - # TODO: Wrote a new validator for the field "sexual_identity" def handle_free_response_sexual_identity(self): user_sexual_identity = self.cleaned_data["sexual_identity"] user_free_response_sexual_identity = self.cleaned_data[ @@ -314,7 +309,6 @@ def handle_free_response_sexual_identity(self): code="free_response_sexual_identity", ) - # TODO: Wrote a new validator for the field "highest_formal_education" def handle_highest_formal_education(self): user_highest_formal_education = self.cleaned_data["highest_formal_education"] user_free_response_highest_formal_education = self.cleaned_data[ diff --git a/hackathon_site/registration/jinja2/registration/application.html b/hackathon_site/registration/jinja2/registration/application.html index 2bdedbd0..a0c1f88c 100644 --- a/hackathon_site/registration/jinja2/registration/application.html +++ b/hackathon_site/registration/jinja2/registration/application.html @@ -41,9 +41,7 @@

Personal Information

{{ render_field(form.free_response_pronouns, show_help_text_as_label=True, size="s12 m6 select2-wrapper") }} {{ render_field(form.gender, size="s12 m6 select2-wrapper") }} {{ render_field(form.free_response_gender, show_help_text_as_label=True, size="s12 m6 select2-wrapper") }} - {# TODO: New entry for sexual identity section#} {{ render_field(form.sexual_identity, show_help_text_as_label=True, size="s12 m6 select2-wrapper") }} - {# TODO: New entry for free response sexual identity section#} {{ render_field(form.free_response_sexual_identity, show_help_text_as_label=True, size="s12 m6 select2-wrapper") }} {# TODO: Commenting out the ethnicity section#} {# {{ render_field(form.ethnicity, size="s12 m6 select2-wrapper") }}#} @@ -51,13 +49,9 @@

Personal Information

{{ render_field(form.country, size="s12 m6 select2-wrapper added-country-margin formAddTopMargin") }} {{ render_field(form.tshirt_size, size="s12 m6 select2-wrapper") }} {{ render_field(form.under_represented_group, show_help_text_as_label=True, size="s12 m6 select2-wrapper") }} - {# TODO: New section for dietary restrictions#} {{ render_field(form.dietary_restrictions, size="s12 m6 select2-wrapper") }} - {# TODO: New entry for free response dietary restriction section#} {{ render_field(form.free_response_dietary_restrictions, show_help_text_as_label=True, size="s12 m6 select2-wrapper") }} - {# TODO: New entry for highest former education#} {{ render_field(form.highest_formal_education, show_help_text_as_label=True, size="s12 m6 select2-wrapper") }} - {# TODO: New entry for free response highest former education#} {{ render_field(form.free_response_highest_formal_education, show_help_text_as_label=True, size="s12 m6 select2-wrapper") }}
diff --git a/hackathon_site/registration/migrations/0009_auto_20240925_0059.py b/hackathon_site/registration/migrations/0009_auto_20240925_0123.py similarity index 99% rename from hackathon_site/registration/migrations/0009_auto_20240925_0059.py rename to hackathon_site/registration/migrations/0009_auto_20240925_0123.py index 50f8a603..15529d3e 100644 --- a/hackathon_site/registration/migrations/0009_auto_20240925_0059.py +++ b/hackathon_site/registration/migrations/0009_auto_20240925_0123.py @@ -1,4 +1,4 @@ -# Generated by Django 3.2.15 on 2024-09-25 04:59 +# Generated by Django 3.2.15 on 2024-09-25 05:23 from django.db import migrations, models diff --git a/hackathon_site/registration/models.py b/hackathon_site/registration/models.py index e80ab9e6..c8b69fdb 100644 --- a/hackathon_site/registration/models.py +++ b/hackathon_site/registration/models.py @@ -60,7 +60,6 @@ class Application(models.Model): TSHIRT_SIZE_CHOICES = [(None, ""), ("S", "S"), ("M", "M"), ("L", "L"), ("XL", "XL")] - # TODO: Adding dietary restriction choices DIETARY_RESTRICTIONS_CHOICES = [ (None, ""), ("none", "None"), @@ -81,7 +80,6 @@ class Application(models.Model): ("unsure", "Unsure"), ] - # TODO: Adding a SEXUAL_IDENTITY choices SEXUAL_IDENTITY_CHOICES = [ (None, ""), ("heterosexual-or-straight", "Heterosexual or straight"), @@ -91,7 +89,6 @@ class Application(models.Model): ("prefer-to-not-answer", "Prefer to not Answer"), ] - # TODO: Adding a HIGHEST_FORMER_EDUCATION choice HIGHEST_FORMER_EDUCATION_CHOICES = [ (None, ""), ("less-than-secondary-or-high-school", "Less than Secondary / High School"), @@ -190,7 +187,6 @@ class Application(models.Model): max_length=50, choices=GENDER_CHOICES, null=False, default="" ) - # TODO: New section to allow people to specify gender identification (if selected "Prefer to Self-Describe") free_response_gender = models.TextField( max_length=200, null=True, @@ -221,12 +217,10 @@ class Application(models.Model): max_length=50, choices=TSHIRT_SIZE_CHOICES, null=False, default="" ) - # TODO: Adding a "Dietary Restriction" section dietary_restrictions = models.CharField( max_length=50, choices=DIETARY_RESTRICTIONS_CHOICES, null=False, default="" ) - # TODO: New section to allow people to clarify dietary restrictions if selected "Other" or "Allergies free_response_dietary_restrictions = models.TextField( max_length=200, null=True, @@ -243,7 +237,6 @@ class Application(models.Model): help_text="Are you in an underrepresented group in tech?", ) - # TODO: Adding a "sexual_identity" section sexual_identity = models.CharField( max_length=50, choices=SEXUAL_IDENTITY_CHOICES, @@ -252,7 +245,6 @@ class Application(models.Model): help_text="Do you consider yourself to be any of the following?", ) - # TODO: New section to allow people to specify sexual identity identification (if selected "Different Identity") free_response_sexual_identity = models.TextField( max_length=200, null=True, @@ -261,7 +253,6 @@ class Application(models.Model): help_text="If you selected 'Different Identity', please specify.", ) - # TODO: Adding a "highest_former_education" level highest_formal_education = models.CharField( max_length=50, choices=HIGHEST_FORMER_EDUCATION_CHOICES, @@ -270,7 +261,6 @@ class Application(models.Model): help_text="What is your highest level of education completed?", ) - # TODO: New section to allow people to specify sexual identity identification (if selected "Different Identity") free_response_highest_formal_education = models.TextField( max_length=200, null=True, From b2bacfc36052bf9c7e1db8d76960a2abc4c01fd1 Mon Sep 17 00:00:00 2001 From: carmen-chau Date: Wed, 25 Sep 2024 01:39:59 -0400 Subject: [PATCH 31/32] remove comments --- hackathon_site/registration/forms.py | 8 ++++---- ...9_auto_20240925_0123.py => 0009_auto_20240925_0135.py} | 2 +- hackathon_site/registration/models.py | 6 ------ 3 files changed, 5 insertions(+), 11 deletions(-) rename hackathon_site/registration/migrations/{0009_auto_20240925_0123.py => 0009_auto_20240925_0135.py} (99%) diff --git a/hackathon_site/registration/forms.py b/hackathon_site/registration/forms.py index 46808cc9..e4d673ee 100644 --- a/hackathon_site/registration/forms.py +++ b/hackathon_site/registration/forms.py @@ -145,13 +145,13 @@ class Meta: "linkedin", "github", "devpost", - "how_many_hackathons", # TODO: New Section - "past_hackathon_info", # TODO: New Section + "how_many_hackathons", + "past_hackathon_info", "what_past_experience", "why_participate", "what_technical_experience", "what_role_in_team_setting", - "discovery_method", # TODO: New Section + "discovery_method", "conduct_agree", "logistics_agree", "email_agree", @@ -191,7 +191,7 @@ class Meta: "class": "materialize-textarea", "placeholder": "Insert answer here...", "data-length": 1000, - "style": "padding-top: 38px;", # TODO: Added padding + "style": "padding-top: 38px;", } ), "why_participate": forms.Textarea( diff --git a/hackathon_site/registration/migrations/0009_auto_20240925_0123.py b/hackathon_site/registration/migrations/0009_auto_20240925_0135.py similarity index 99% rename from hackathon_site/registration/migrations/0009_auto_20240925_0123.py rename to hackathon_site/registration/migrations/0009_auto_20240925_0135.py index 15529d3e..8b25cf54 100644 --- a/hackathon_site/registration/migrations/0009_auto_20240925_0123.py +++ b/hackathon_site/registration/migrations/0009_auto_20240925_0135.py @@ -1,4 +1,4 @@ -# Generated by Django 3.2.15 on 2024-09-25 05:23 +# Generated by Django 3.2.15 on 2024-09-25 05:35 from django.db import migrations, models diff --git a/hackathon_site/registration/models.py b/hackathon_site/registration/models.py index c8b69fdb..2924890f 100644 --- a/hackathon_site/registration/models.py +++ b/hackathon_site/registration/models.py @@ -144,7 +144,6 @@ class Application(models.Model): (23, "22+"), ] - # TODO: Adding new hackathon number choices HACKATHON_NUMBER_CHOICES = [ (None, ""), ("0", "0"), @@ -154,7 +153,6 @@ class Application(models.Model): ("4", "4"), ("5 or more", "5 or more"), ] - # TODO: Adding new discovery choices REFERRAL_CHOICES = [ (None, ""), ("instagram", "Instagram"), @@ -308,7 +306,6 @@ class Application(models.Model): devpost = models.URLField( max_length=200, help_text="Devpost Profile (Optional)", null=True, blank=True ) - # TODO: New question how_many_hackathons = models.TextField( null=False, default="", @@ -316,7 +313,6 @@ class Application(models.Model): choices=HACKATHON_NUMBER_CHOICES, max_length=100, ) - # TODO: New field past_hackathon_info = models.TextField( null=False, default="", @@ -338,14 +334,12 @@ class Application(models.Model): help_text="What is your technical experience with software and hardware?", max_length=1000, ) - # TODO: New Field what_role_in_team_setting = models.TextField( null=False, default="", help_text="What role do you typically take on in a team setting? Give an example of how you contributed to team success.", max_length=1000, ) - # TODO: New Field discovery_method = models.TextField( null=False, default="", From ce0f9c3364e3b0cc9f0d1673b14196fe46718718 Mon Sep 17 00:00:00 2001 From: carmen-chau Date: Wed, 25 Sep 2024 21:15:25 -0400 Subject: [PATCH 32/32] removed ethnicity comment --- hackathon_site/registration/forms.py | 2 +- .../registration/jinja2/registration/application.html | 1 - .../{0009_auto_20240925_0135.py => 0009_auto_20240925_2109.py} | 2 +- hackathon_site/registration/models.py | 2 -- 4 files changed, 2 insertions(+), 5 deletions(-) rename hackathon_site/registration/migrations/{0009_auto_20240925_0135.py => 0009_auto_20240925_2109.py} (99%) diff --git a/hackathon_site/registration/forms.py b/hackathon_site/registration/forms.py index e4d673ee..e02557d2 100644 --- a/hackathon_site/registration/forms.py +++ b/hackathon_site/registration/forms.py @@ -125,7 +125,7 @@ class Meta: "free_response_pronouns", "gender", "free_response_gender", - # "ethnicity", # TODO: Commenting out this section + # "ethnicity", "phone_number", "city", "country", diff --git a/hackathon_site/registration/jinja2/registration/application.html b/hackathon_site/registration/jinja2/registration/application.html index a0c1f88c..0a118cde 100644 --- a/hackathon_site/registration/jinja2/registration/application.html +++ b/hackathon_site/registration/jinja2/registration/application.html @@ -43,7 +43,6 @@

Personal Information

{{ render_field(form.free_response_gender, show_help_text_as_label=True, size="s12 m6 select2-wrapper") }} {{ render_field(form.sexual_identity, show_help_text_as_label=True, size="s12 m6 select2-wrapper") }} {{ render_field(form.free_response_sexual_identity, show_help_text_as_label=True, size="s12 m6 select2-wrapper") }} - {# TODO: Commenting out the ethnicity section#} {# {{ render_field(form.ethnicity, size="s12 m6 select2-wrapper") }}#} {{ render_field(form.city, size="s12 m6 select2-wrapper added-country-margin formAddTopMargin") }} {{ render_field(form.country, size="s12 m6 select2-wrapper added-country-margin formAddTopMargin") }} diff --git a/hackathon_site/registration/migrations/0009_auto_20240925_0135.py b/hackathon_site/registration/migrations/0009_auto_20240925_2109.py similarity index 99% rename from hackathon_site/registration/migrations/0009_auto_20240925_0135.py rename to hackathon_site/registration/migrations/0009_auto_20240925_2109.py index 8b25cf54..7f2d5b43 100644 --- a/hackathon_site/registration/migrations/0009_auto_20240925_0135.py +++ b/hackathon_site/registration/migrations/0009_auto_20240925_2109.py @@ -1,4 +1,4 @@ -# Generated by Django 3.2.15 on 2024-09-25 05:35 +# Generated by Django 3.2.15 on 2024-09-26 01:09 from django.db import migrations, models diff --git a/hackathon_site/registration/models.py b/hackathon_site/registration/models.py index 2924890f..14a987aa 100644 --- a/hackathon_site/registration/models.py +++ b/hackathon_site/registration/models.py @@ -192,8 +192,6 @@ class Application(models.Model): default="", help_text="If you selected 'Prefer to Self-Describe', please specify.", ) - - # TODO: Making this ethnicity section OPTIONAL ethnicity = models.CharField( max_length=50, choices=ETHNICITY_CHOICES, null=False, blank=True, default="" )