Further polishing for subjects

This commit is contained in:
Keannu Christian Bernasol 2023-06-27 18:15:31 +08:00
parent de1dabf53c
commit 492a605557
28 changed files with 225 additions and 151 deletions

View file

@ -1,4 +1,4 @@
# Generated by Django 4.2.2 on 2023-06-27 07:45
# Generated by Django 4.2.2 on 2023-06-27 09:44
from django.db import migrations, models

View file

@ -14,10 +14,10 @@ class Semester(models.Model):
@receiver(post_migrate)
def populate_courses(sender, **kwargs):
def populate_semesters(sender, **kwargs):
if sender.name == 'semesters':
Semester.objects.get_or_create(
name='1st Semester', shortname='1st')
name='1st Semester', shortname='1stSem')
Semester.objects.get_or_create(
name='2nd Semester', shortname='2nd')
name='2nd Semester', shortname='2ndSem')
# Add more predefined records as needed