Polished student_status serializer

This commit is contained in:
Keannu Christian Bernasol 2023-06-27 13:40:31 +08:00
parent 0fc98ede20
commit f0d052bc66
12 changed files with 35 additions and 123 deletions

View file

@ -1,4 +1,4 @@
# Generated by Django 4.2.2 on 2023-06-26 13:38
# Generated by Django 4.2.2 on 2023-06-27 05:15
import accounts.models
import django.contrib.auth.models
@ -36,6 +36,7 @@ class Migration(migrations.Migration):
('student_id_number', models.CharField(max_length=16, validators=[accounts.models.validate_student_id])),
('year_level', models.CharField(choices=[('1st', '1st year'), ('2nd', '2nd year'), ('3rd', '3rd year'), ('4th', '4th year'), ('5th', '5th Year'), ('Irreg', 'Irregular')], max_length=50)),
('semester', models.CharField(choices=[('1st', '1st semester'), ('2nd', '2nd semester')], max_length=50)),
('course', models.CharField(choices=[('BSIT', 'Bachelor of Science in Information Technology'), ('BSCS', 'Bachelor of Science in Computer Science'), ('BSCpE', 'Bachelor of Science in Computer Engineering')], max_length=50)),
('avatar', models.ImageField(null=True, upload_to=accounts.models.CustomUser._get_upload_to)),
('groups', models.ManyToManyField(blank=True, help_text='The groups this user belongs to. A user will get all permissions granted to each of their groups.', related_name='user_set', related_query_name='user', to='auth.group', verbose_name='groups')),
('user_permissions', models.ManyToManyField(blank=True, help_text='Specific permissions for this user.', related_name='user_set', related_query_name='user', to='auth.permission', verbose_name='user permissions')),

View file

@ -1,27 +0,0 @@
# Generated by Django 4.2.2 on 2023-06-26 13:46
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('accounts', '0001_initial'),
]
operations = [
migrations.CreateModel(
name='StudentStatus',
fields=[
('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, primary_key=True, serialize=False, to=settings.AUTH_USER_MODEL)),
('x_latitude', models.FloatField(null=True)),
('y_latitude', models.FloatField(null=True)),
('subject', models.CharField(max_length=100)),
('year_level', models.CharField(choices=[('1st', '1st year'), ('2nd', '2nd year'), ('3rd', '3rd year'), ('4th', '4th year'), ('5th', '5th Year'), ('Irreg', 'Irregular')], max_length=50)),
('semester', models.CharField(choices=[('1st', '1st semester'), ('2nd', '2nd semester')], max_length=50)),
('timestamp', models.DateField(auto_now_add=True)),
],
),
]

View file

@ -1,16 +0,0 @@
# Generated by Django 4.2.2 on 2023-06-26 14:03
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('accounts', '0002_studentstatus'),
]
operations = [
migrations.DeleteModel(
name='StudentStatus',
),
]