Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions applications/forms/hacker.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ class HackerApplicationForm(_BaseApplicationForm):
bootstrap_field_info = {
"🎓 Education Info": {
"fields": [
{"name": "kind_studies", "space": 12},
{"name": "university", "space": 12},
{"name": "degree", "space": 12},
{"name": "graduation_year", "space": 12},
Expand Down Expand Up @@ -129,8 +130,24 @@ def clean_projects(self):
)
return data

def clean_kind_studies(self):
data = self.cleaned_data["kind_studies"]
if not data or data == "":
raise forms.ValidationError("Please select your current studies.")
return data


first_timer = common_first_timer()

kind_studies = forms.ChoiceField(
required=True,
label='What kind of studies are you currently pursuing?',
choices=([('', '- Select an option -')] + models.constants.KIND_STUDIES),
widget=forms.Select(
attrs={'class': 'form-control'}
)
)


university = common_university()

Expand Down
18 changes: 18 additions & 0 deletions applications/migrations/0060_hackerapplication_kind_studies.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Generated by Django 3.2.23 on 2025-12-11 03:00

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('applications', '0059_remove_volunteerapplication_pronouns'),
]

operations = [
migrations.AddField(
model_name='hackerapplication',
name='kind_studies',
field=models.CharField(choices=[('SECONDARY', 'Secondary Education - Baccalaureate'), ('VOCATIONAL', 'Vocational Training (FP)'), ('BACHELOR', 'Bachelor’s Degree'), ('MASTER', 'Master’s Degree'), ('OTHER', 'Other')], default='NA', max_length=300),
),
]
11 changes: 11 additions & 0 deletions applications/models/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,17 @@
(2, "Sunday")
]

ST_SECONDARY = 'SECONDARY'
ST_VOCATIONAL = 'VOCATIONAL'
ST_BACHELOR = 'BACHELOR'
ST_MASTER = 'MASTER'
ST_OTHER = 'OTHER'

KIND_STUDIES = [
(ST_SECONDARY, 'Secondary Education - Baccalaureate'), (ST_VOCATIONAL, 'Vocational Training (FP)'),
(ST_BACHELOR, 'Bachelor’s Degree'), (ST_MASTER, 'Master’s Degree'), (ST_OTHER, 'Other')
]

HACK_NAME = getattr(hackathon_variables, 'HACKATHON_NAME', "HackAssistant")
EXTRA_NAME = [' 2016 Fall', ' 2016 Winter', ' 2017 Fall', ' 2017 Winter', ' 2018', ' 2019', ' 2021', ' 2022', ' 2023', ' 2024']
PREVIOUS_HACKS = [(i, HACK_NAME + EXTRA_NAME[i]) for i in range(0, len(EXTRA_NAME))]
Expand Down
3 changes: 2 additions & 1 deletion applications/models/hacker.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ class HackerApplication(BaseApplication):
# Random lenny face
lennyface = models.CharField(max_length=20, default="-.-")

# University
# Studies
kind_studies = models.CharField(max_length=300, choices=KIND_STUDIES, default=NO_ANSWER)
graduation_year = models.IntegerField(choices=YEARS, default=DEFAULT_YEAR)
university = models.CharField(max_length=300)
degree = models.CharField(max_length=300)
Expand Down