Skip to content

Commit

Permalink
Merge branch 'TeamPage' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
yukitya-1811 committed Mar 13, 2024
2 parents d514b78 + 829451d commit 802807e
Show file tree
Hide file tree
Showing 16 changed files with 521 additions and 255 deletions.
8 changes: 5 additions & 3 deletions corpus/accounts/admin.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
from django.contrib import admin
from django.contrib.auth.admin import UserAdmin

from .models import Core
from .models import ExecutiveMember
from .models import User
from .models import Faculty
from .models import Core
from .models import User

# Register your models here.

Expand Down Expand Up @@ -83,8 +83,10 @@ class ExecutiveMemberAdmin(admin.ModelAdmin):
)
ordering = ("user",)


class CoreAdmin(admin.ModelAdmin):
list_display = ("user", "sig", "post", "term_start")
list_display = ("executivemember", "sig", "post", "term_start")


class FacultyAdmin(admin.ModelAdmin):
list_display = ("user", "sig", "post", "term_start")
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Generated by Django 4.2.7 on 2024-01-26 20:50
from django.db import migrations
from django.db import models


class Migration(migrations.Migration):

dependencies = [
("accounts", "0003_alter_executivemember_date_joined"),
]

operations = [
migrations.AddField(
model_name="executivemember",
name="profile_picture",
field=models.ImageField(blank=True, null=True, upload_to=""),
),
migrations.AlterField(
model_name="executivemember",
name="date_joined",
field=models.DateTimeField(verbose_name="Date Joined"),
),
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
# Generated by Django 4.2.10 on 2024-03-12 16:35
import django.db.models.deletion
import django.utils.timezone
from django.conf import settings
from django.db import migrations
from django.db import models


class Migration(migrations.Migration):

dependencies = [
("config", "0004_sig_society_sigs"),
("accounts", "0004_executivemember_profile_picture_and_more"),
]

operations = [
migrations.AlterField(
model_name="executivemember",
name="date_joined",
field=models.DateTimeField(
default=django.utils.timezone.now, verbose_name="Date Joined"
),
),
migrations.AlterField(
model_name="executivemember",
name="github",
field=models.CharField(
blank=True, max_length=200, null=True, verbose_name="GitHub Username"
),
),
migrations.AlterField(
model_name="executivemember",
name="profile_picture",
field=models.ImageField(
blank=True, null=True, upload_to="execmember/profile_picture"
),
),
migrations.CreateModel(
name="Faculty",
fields=[
(
"id",
models.BigAutoField(
auto_created=True,
primary_key=True,
serialize=False,
verbose_name="ID",
),
),
("post", models.CharField(max_length=100)),
("term_start", models.DateField(default=django.utils.timezone.now)),
("term_end", models.DateField(null=True)),
(
"sig",
models.ForeignKey(
on_delete=django.db.models.deletion.CASCADE, to="config.sig"
),
),
(
"user",
models.OneToOneField(
on_delete=django.db.models.deletion.CASCADE,
to=settings.AUTH_USER_MODEL,
),
),
],
options={
"verbose_name_plural": "faculties",
},
),
migrations.CreateModel(
name="Core",
fields=[
(
"id",
models.BigAutoField(
auto_created=True,
primary_key=True,
serialize=False,
verbose_name="ID",
),
),
("post", models.CharField(max_length=100)),
("term_start", models.DateField(default=django.utils.timezone.now)),
("term_end", models.DateField(null=True)),
(
"sig",
models.ForeignKey(
on_delete=django.db.models.deletion.CASCADE, to="config.sig"
),
),
(
"user",
models.OneToOneField(
on_delete=django.db.models.deletion.CASCADE,
to=settings.AUTH_USER_MODEL,
),
),
],
),
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
# Generated by Django 4.2.10 on 2024-03-13 16:58
import django.db.models.deletion
from django.db import migrations
from django.db import models


class Migration(migrations.Migration):

dependencies = [
("accounts", "0005_alter_executivemember_date_joined_and_more"),
]

operations = [
migrations.RemoveField(
model_name="core",
name="user",
),
migrations.AddField(
model_name="core",
name="executivemember",
field=models.OneToOneField(
default=0,
on_delete=django.db.models.deletion.CASCADE,
to="accounts.executivemember",
),
preserve_default=False,
),
migrations.AddField(
model_name="faculty",
name="website",
field=models.URLField(blank=True, null=True),
),
migrations.AlterField(
model_name="core",
name="post",
field=models.IntegerField(
choices=[
(1, "Convenor"),
(2, "Chairperson"),
(3, "Vice Chairperson"),
(4, "Secretary"),
(5, "Joint Secretary"),
(6, "Treasurer(Branch)"),
(7, "Treasurer(Institute)"),
(8, "Webmaster"),
(9, "Media Lead"),
(10, "Outreach Lead"),
(11, "Envision Lead"),
(12, "Labs Lead"),
(13, "CompSoc Chair"),
(14, "CompSoc Vice Chair"),
(15, "CompSoc Secretary"),
(16, "CompSoc Project Head"),
(17, "CompSoc Project Coordinator"),
(18, "CIS Chair"),
(19, "CIS Secretary"),
(20, "CIS Project Head"),
(21, "Diode Chair"),
(22, "SPS Chair"),
(23, "SPS Vice Chair"),
(24, "SPS Secretary"),
(25, "CAS Chair"),
(26, "CAS Vice Chair"),
(27, "CAS Secretary"),
(28, "RAS Chair"),
(29, "RAS Secretary"),
(30, "Piston Chair"),
(31, "Piston Vice Chair"),
(32, "Piston Secretary"),
(33, "IAS Chair"),
(34, "IAS Secretary"),
]
),
),
migrations.AlterField(
model_name="core",
name="term_end",
field=models.DateField(),
),
migrations.AlterField(
model_name="core",
name="term_start",
field=models.DateField(),
),
migrations.AlterField(
model_name="faculty",
name="post",
field=models.CharField(
blank=True,
choices=[
("BRANCH COUNSELOR", "Branch Counselor"),
("CIS FACULTY ADVISOR", "CIS Faculty Advisor"),
("COMPSOC FACULTY ADVISOR", "CompSoc Faculty Advisor"),
("CAS FACULTY ADVISOR", "CAS Faculty Advisor"),
("SPS FACULTY ADVISOR", "SPS Faculty Advisor"),
(
"PHOTONIC SOCIETY FACULTY ADVISOR",
"Photonic Society Faculty Advisor",
),
("WIE FACULTY ADVISOR", "WIE Faculty Advisor"),
("IAS FACULTY ADVISOR", "IAS Faculty Advisor"),
("SIGHT CHAIR", "SIGHT Chair"),
("RAS FACULTY ADVISOR", "RAS Faculty Advisor"),
("GRSS FACULTY ADVISOR", "GRSS Faculty Advisor"),
],
max_length=100,
),
),
migrations.AlterField(
model_name="faculty",
name="term_end",
field=models.DateField(),
),
migrations.AlterField(
model_name="faculty",
name="term_start",
field=models.DateField(),
),
]
37 changes: 37 additions & 0 deletions corpus/accounts/migrations/0007_alter_faculty_post.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Generated by Django 4.2.10 on 2024-03-13 17:40
from django.db import migrations
from django.db import models


class Migration(migrations.Migration):

dependencies = [
("accounts", "0006_remove_core_user_core_executivemember_and_more"),
]

operations = [
migrations.AlterField(
model_name="faculty",
name="post",
field=models.CharField(
blank=True,
choices=[
("Branch Counselor", "Branch Counselor"),
("CIS Faculty Advisor", "CIS Faculty Advisor"),
("CompSoc Faculty Advisor", "CompSoc Faculty Advisor"),
("CAS Faculty Advisor", "CAS Faculty Advisor"),
("SPS Faculty Advisor", "SPS Faculty Advisor"),
(
"Photonic Society Faculty Advisor",
"Photonic Society Faculty Advisor",
),
("WIE Faculty Advisor", "WIE Faculty Advisor"),
("IAS Faculty Advisor", "IAS Faculty Advisor"),
("SIGHT Chair", "SIGHT Chair"),
("RAS Faculty Advisor", "RAS Faculty Advisor"),
("GRSS Faculty Advisor", "GRSS Faculty Advisor"),
],
max_length=100,
),
),
]
Loading

0 comments on commit 802807e

Please sign in to comment.