diff --git a/hackathon_site/event/jinja2/event/base.html b/hackathon_site/event/jinja2/event/base.html index 73234f9..c3ce355 100644 --- a/hackathon_site/event/jinja2/event/base.html +++ b/hackathon_site/event/jinja2/event/base.html @@ -50,9 +50,11 @@ Logout {% else %} -
The application opening date for {{ hackathon_name }} will be announced soon. Please check back!
+ {% elif localtime(now()) < registration_open_date %}Applications for {{ hackathon_name }} will open on {{ localtime(registration_open_date)|strftime("%B %-d, %Y") }}. Please check back then!
{% elif registration_open_date <= localtime(now()) < registration_close_date %} diff --git a/hackathon_site/registration/migrations/0016_auto_20261122_1951.py b/hackathon_site/registration/migrations/0016_auto_20261122_1951.py new file mode 100644 index 0000000..e977989 --- /dev/null +++ b/hackathon_site/registration/migrations/0016_auto_20261122_1951.py @@ -0,0 +1,40 @@ +# Generated by Django 3.2.15 on 2026-11-23 00:51 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ("registration", "0015_fix_mlh_dev_link_text"), + ] + + operations = [ + migrations.AddField( + model_name="application", + name="community_problem", + field=models.TextField( + default="", + help_text="What is one problem in your community or everyday life that you would like to solve through technology?", + max_length=1000, + ), + ), + migrations.AddField( + model_name="application", + name="deadline_plan", + field=models.TextField( + default="", + help_text="It’s 11 PM, and you have a project due at 11 AM tomorrow. Would you choose to stay up late or wake up early to finish it, and what would your plan be?", + max_length=1000, + ), + ), + migrations.AddField( + model_name="application", + name="proud_project", + field=models.TextField( + default="", + help_text="Tell us a project that you have made in the past (technical or non-technical) that you are most proud of? What aspect of that project stood out to you?", + max_length=1000, + ), + ), + ] diff --git a/hackathon_site/registration/migrations/0017_auto_20261123_1432.py b/hackathon_site/registration/migrations/0017_auto_20261123_1432.py new file mode 100644 index 0000000..8dd3a9a --- /dev/null +++ b/hackathon_site/registration/migrations/0017_auto_20261123_1432.py @@ -0,0 +1,31 @@ +# Generated by Django 3.2.15 on 2026-11-23 19:32 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ("registration", "0016_auto_20261122_1951"), + ] + + operations = [ + migrations.AlterField( + model_name="application", + name="email_agree", + field=models.BooleanField( + blank=True, + default=False, + help_text="I authorize MLH and DEV to send me occasional emails about relevant events, career opportunities, and community announcements.", + null=True, + ), + ), + migrations.AlterField( + model_name="application", + name="logistics_agree", + field=models.BooleanField( + default=False, + help_text='I authorize you to share my application/registration information with Major League Hacking for event administration, ranking, and administration (including the creation of linked accounts on MLH and DEV) in line with the MLH Privacy Policy. I further agree to the terms of both the MLH Contest Terms and Conditions and the MLH Privacy Policy.', + ), + ), + ] diff --git a/hackathon_site/registration/migrations/0018_written_response_word_limit.py b/hackathon_site/registration/migrations/0018_written_response_word_limit.py new file mode 100644 index 0000000..76888d3 --- /dev/null +++ b/hackathon_site/registration/migrations/0018_written_response_word_limit.py @@ -0,0 +1,42 @@ +from django.db import migrations, models + + +class Migration(migrations.Migration): + dependencies = [ + ("registration", "0017_auto_20261123_1432"), + ] + + operations = [ + migrations.AlterField( + 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.", + ), + ), + migrations.AlterField( + model_name="application", + name="community_problem", + field=models.TextField( + default="", + help_text="What is one problem in your community or everyday life that you would like to solve through technology?", + ), + ), + migrations.AlterField( + model_name="application", + name="proud_project", + field=models.TextField( + default="", + help_text="Tell us a project that you have made in the past (technical or non-technical) that you are most proud of? What aspect of that project stood out to you?", + ), + ), + migrations.AlterField( + model_name="application", + name="deadline_plan", + field=models.TextField( + default="", + help_text="It’s 11 PM, and you have a project due at 11 AM tomorrow. Would you choose to stay up late or wake up early to finish it, and what would your plan be?", + ), + ), + ] diff --git a/hackathon_site/registration/models.py b/hackathon_site/registration/models.py index 00b638e..d3e95c2 100644 --- a/hackathon_site/registration/models.py +++ b/hackathon_site/registration/models.py @@ -316,7 +316,6 @@ class Application(models.Model): 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, ) what_past_experience = models.TextField( null=False, @@ -340,6 +339,21 @@ class Application(models.Model): help_text="If you had a million dollars to invest in one technology brand, what would it be and why?", max_length=1000, ) + community_problem = models.TextField( + null=False, + default="", + help_text="What is one problem in your community or everyday life that you would like to solve through technology?", + ) + proud_project = models.TextField( + null=False, + default="", + help_text="Tell us a project that you have made in the past (technical or non-technical) that you are most proud of? What aspect of that project stood out to you?", + ) + deadline_plan = models.TextField( + null=False, + default="", + help_text="It’s 11 PM, and you have a project due at 11 AM tomorrow. Would you choose to stay up late or wake up early to finish it, and what would your plan be?", + ) discovery_method = models.TextField( null=False, default="", @@ -358,18 +372,18 @@ class Application(models.Model): help_text="I authorize you to share my application/registration information with Major League Hacking" " for event administration, ranking, and administration (including the creation of linked accounts on MLH and " 'DEV) in line with the ' - "MLH Privacy Policy. " + 'MLH Privacy Policy. ' "I further agree to the terms of both the " 'MLH Contest Terms and Conditions' " and the " - "MLH Privacy Policy.", + 'MLH Privacy Policy.', blank=False, null=False, default=False, ) email_agree = models.BooleanField( - help_text="I authorize MLH + DEV to send me occasional emails about relevant events, career opportunities, and community announcements.", + help_text="I authorize MLH and DEV to send me occasional emails about relevant events, career opportunities, and community announcements.", blank=True, null=True, default=False, diff --git a/hackathon_site/registration/test_forms.py b/hackathon_site/registration/test_forms.py index 0d3b321..aefa1d5 100644 --- a/hackathon_site/registration/test_forms.py +++ b/hackathon_site/registration/test_forms.py @@ -101,10 +101,9 @@ def setUp(self): "program": "computer science", "how_many_hackathons": "2", "past_hackathon_info": "n/a", - "what_past_experience": "foo", - "why_participate": "foo", - "what_technical_experience": "foo", - "one_million_dollars_investment": "foo", + "community_problem": "foo", + "proud_project": "foo", + "deadline_plan": "foo", "discovery_method": "instagram", "conduct_agree": True, "logistics_agree": True, @@ -217,6 +216,31 @@ def test_phone_number_regex(self): self.assertFalse(form.is_valid(), msg=number) self.assertIn("Enter a valid phone number.", form.errors["phone_number"]) + def test_written_response_word_limit(self): + written_responses = ( + "past_hackathon_info", + "community_problem", + "proud_project", + "deadline_plan", + ) + for field in written_responses: + with self.subTest(field=field): + data = self.data.copy() + data[field] = " " + "word\n" * 250 + form = self._build_form(data=data) + self.assertTrue(form.is_valid(), msg=form.errors) + + data[field] += "extra" + form = self._build_form(data=data) + self.assertFalse(form.is_valid()) + self.assertIn("Please use no more than 250 words.", form.errors[field]) + + def test_written_responses_can_exceed_old_character_limit(self): + data = self.data.copy() + data["community_problem"] = "longword " * 200 + form = self._build_form(data=data) + self.assertTrue(form.is_valid(), msg=form.errors) + def test_phone_number_clean_up(self): unclean_to_clean_numbers = ("+1 (123) 246-7890", "11232467890") diff --git a/hackathon_site/registration/test_views.py b/hackathon_site/registration/test_views.py index eaa1c32..bbf3951 100644 --- a/hackathon_site/registration/test_views.py +++ b/hackathon_site/registration/test_views.py @@ -81,6 +81,12 @@ class SignUpClosedViewTestCase(TestCase): def setUp(self): self.view = reverse("registration:signup_closed") + @override_settings(REGISTRATION_OPEN_DATE=None) + def test_opening_date_not_announced(self): + response = self.client.get(self.view) + self.assertContains(response, "Applications have not opened yet") + self.assertContains(response, "will be announced soon") + @override_settings( REGISTRATION_OPEN_DATE=datetime(2020, 1, 2, tzinfo=settings.TZ_INFO) ) @@ -189,10 +195,9 @@ def setUp(self): "program": "computer science", "how_many_hackathons": "2", "past_hackathon_info": "n/a", - "what_past_experience": "foo", - "why_participate": "foo", - "what_technical_experience": "foo", - "one_million_dollars_investment": "foo", + "community_problem": "foo", + "proud_project": "foo", + "deadline_plan": "foo", "discovery_method": "instagram", "conduct_agree": True, "logistics_agree": True, diff --git a/hackathon_site/review/admin.py b/hackathon_site/review/admin.py index be934aa..ecb6393 100644 --- a/hackathon_site/review/admin.py +++ b/hackathon_site/review/admin.py @@ -126,6 +126,9 @@ class ApplicationInline(admin.TabularInline): "github", "devpost", "past_hackathon_info", + "community_problem", + "proud_project", + "deadline_plan", "what_past_experience", "why_participate", "what_technical_experience",