mirror of
https://github.com/lemeow125/StudE-Backend.git
synced 2025-06-29 00:35:45 +08:00
Major overhaul to subject model and serializers
This commit is contained in:
parent
0eff07a1ae
commit
0fd790505e
26 changed files with 199 additions and 173 deletions
|
@ -1,4 +1,4 @@
|
|||
# Generated by Django 4.2.3 on 2023-07-26 03:53
|
||||
# Generated by Django 4.2.3 on 2023-07-26 12:06
|
||||
|
||||
import accounts.models
|
||||
import django.contrib.auth.models
|
||||
|
@ -13,9 +13,9 @@ class Migration(migrations.Migration):
|
|||
initial = True
|
||||
|
||||
dependencies = [
|
||||
('semesters', '0001_initial'),
|
||||
('courses', '0001_initial'),
|
||||
('auth', '0012_alter_user_first_name_max_length'),
|
||||
('semesters', '0001_initial'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
|
@ -35,7 +35,7 @@ class Migration(migrations.Migration):
|
|||
('is_active', models.BooleanField(default=False)),
|
||||
('is_student', models.BooleanField(default=True)),
|
||||
('is_studying', models.BooleanField(default=False)),
|
||||
('is_banned', models.BooleanField(default=False)),
|
||||
('irregular', models.BooleanField(default=False)),
|
||||
('student_id_number', models.CharField(max_length=16, validators=[accounts.models.validate_student_id])),
|
||||
('avatar', models.ImageField(null=True, upload_to=accounts.models.CustomUser._get_upload_to)),
|
||||
('course', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='courses.course')),
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# Generated by Django 4.2.3 on 2023-07-26 03:53
|
||||
# Generated by Django 4.2.3 on 2023-07-26 12:06
|
||||
|
||||
from django.db import migrations, models
|
||||
import django.db.models.deletion
|
||||
|
@ -9,9 +9,9 @@ class Migration(migrations.Migration):
|
|||
initial = True
|
||||
|
||||
dependencies = [
|
||||
('year_levels', '0001_initial'),
|
||||
('subjects', '0001_initial'),
|
||||
('accounts', '0001_initial'),
|
||||
('year_levels', '0001_initial'),
|
||||
('auth', '0012_alter_user_first_name_max_length'),
|
||||
]
|
||||
|
||||
|
@ -19,7 +19,7 @@ class Migration(migrations.Migration):
|
|||
migrations.AddField(
|
||||
model_name='customuser',
|
||||
name='subjects',
|
||||
field=models.ManyToManyField(to='subjects.subjectinstance'),
|
||||
field=models.ManyToManyField(to='subjects.subject'),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='customuser',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue