Skip to content

Commit

Permalink
Merge branch 'master' into stored_favorite_membership_counts
Browse files Browse the repository at this point in the history
  • Loading branch information
shiva-menta committed Jan 24, 2024
2 parents 5f8d8b2 + 72f6470 commit 4ba20fb
Show file tree
Hide file tree
Showing 26 changed files with 1,037 additions and 551 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
# Python files
__pycache__/
*.pyc
.python-version

# Distribution
/frontend/public/storybook/
Expand All @@ -27,6 +28,8 @@ db.sqlite3

# React
node_modules/
.yarn
.yarnrc.yml
.next/

# Development Enviroment
Expand Down
2 changes: 2 additions & 0 deletions backend/clubs/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
Advisor,
ApplicationCommittee,
ApplicationCycle,
ApplicationExtension,
ApplicationMultipleChoice,
ApplicationQuestion,
ApplicationQuestionResponse,
Expand Down Expand Up @@ -412,6 +413,7 @@ class ApplicationSubmissionAdmin(admin.ModelAdmin):

admin.site.register(Asset)
admin.site.register(ApplicationCommittee)
admin.site.register(ApplicationExtension)
admin.site.register(ApplicationMultipleChoice)
admin.site.register(ApplicationQuestion)
admin.site.register(ApplicationQuestionResponse)
Expand Down
10 changes: 10 additions & 0 deletions backend/clubs/management/commands/populate.py
Original file line number Diff line number Diff line change
Expand Up @@ -394,6 +394,12 @@ def get_image(url):
tag_undergrad, _ = Tag.objects.get_or_create(name="Undergraduate")
tag_generic, _ = Tag.objects.get_or_create(name="Generic")

wharton_badge, _ = Badge.objects.get_or_create(
label="Wharton Council",
purpose="Dummy badge to mock Wharton-affiliated clubs",
visible=True,
)

for i in range(1, 50):
club, created = Club.objects.get_or_create(
code="z-club-{}".format(i),
Expand All @@ -406,6 +412,10 @@ def get_image(url):
},
)

if 10 <= i <= 15:
# Make some clubs Wharton-affiliated
club.badges.add(wharton_badge)

if created:
club.available_virtually = i % 2 == 0
club.appointment_needed = i % 3 == 0
Expand Down
166 changes: 0 additions & 166 deletions backend/clubs/management/commands/wharton_council_application.py

This file was deleted.

47 changes: 47 additions & 0 deletions backend/clubs/migrations/0091_applicationextension.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# Generated by Django 3.2.18 on 2023-11-25 03:58

import django.db.models.deletion
from django.conf import settings
from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
("clubs", "0090_auto_20230106_1443"),
]

operations = [
migrations.CreateModel(
name="ApplicationExtension",
fields=[
(
"id",
models.AutoField(
auto_created=True,
primary_key=True,
serialize=False,
verbose_name="ID",
),
),
("end_time", models.DateTimeField()),
(
"application",
models.ForeignKey(
on_delete=django.db.models.deletion.CASCADE,
related_name="extensions",
to="clubs.clubapplication",
),
),
(
"user",
models.ForeignKey(
on_delete=django.db.models.deletion.CASCADE,
to=settings.AUTH_USER_MODEL,
),
),
],
options={"unique_together": {("user", "application")}},
),
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Generated by Django 3.2.18 on 2023-11-17 22:01

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
("clubs", "0090_auto_20230106_1443"),
]

operations = [
migrations.AddField(
model_name="clubapplication",
name="application_end_time_exception",
field=models.BooleanField(blank=True, default=False),
),
]
13 changes: 13 additions & 0 deletions backend/clubs/migrations/0092_merge_20240106_1117.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Generated by Django 3.2.18 on 2024-01-06 16:17

from django.db import migrations


class Migration(migrations.Migration):

dependencies = [
("clubs", "0091_applicationextension"),
("clubs", "0091_clubapplication_application_end_time_exception"),
]

operations = []
23 changes: 23 additions & 0 deletions backend/clubs/migrations/0093_auto_20240106_1153.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Generated by Django 3.2.18 on 2024-01-06 16:53

from django.conf import settings
from django.db import migrations


class Migration(migrations.Migration):

dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
("clubs", "0092_merge_20240106_1117"),
]

operations = [
migrations.AlterUniqueTogether(
name="applicationquestionresponse",
unique_together={("question", "submission")},
),
migrations.AlterUniqueTogether(
name="applicationsubmission",
unique_together={("user", "application", "committee")},
),
]
18 changes: 18 additions & 0 deletions backend/clubs/migrations/0094_applicationcycle_release_date.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Generated by Django 3.2.18 on 2024-01-11 14:39

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
("clubs", "0093_auto_20240106_1153"),
]

operations = [
migrations.AddField(
model_name="applicationcycle",
name="release_date",
field=models.DateTimeField(null=True),
),
]
Loading

0 comments on commit 4ba20fb

Please sign in to comment.