diff --git a/stude/accounts/admin.py b/stude/accounts/admin.py index 2ce5065..1eaaa68 100644 --- a/stude/accounts/admin.py +++ b/stude/accounts/admin.py @@ -5,6 +5,7 @@ from .models import CustomUser from year_levels.models import Year_Level from semesters.models import Semester from courses.models import Course +from subjects.models import Subject class CustomUserForm(forms.ModelForm): @@ -14,6 +15,8 @@ class CustomUserForm(forms.ModelForm): queryset=Semester.objects.all(), required=False) course = forms.ModelChoiceField( queryset=Course.objects.all(), required=False) + subjects = forms.ModelMultipleChoiceField( + queryset=Subject.objects.all(), required=False) avatar = forms.ImageField(required=False) class Meta: @@ -27,7 +30,7 @@ class CustomUserAdmin(UserAdmin): fieldsets = UserAdmin.fieldsets + ( (None, {'fields': ('student_id_number', - 'year_level', 'semester', 'course', 'avatar', 'is_student', 'is_banned')}), + 'year_level', 'semester', 'course', 'subjects', 'avatar', 'is_student', 'is_banned')}), ) diff --git a/stude/accounts/migrations/0001_initial.py b/stude/accounts/migrations/0001_initial.py index 8f91475..fedcb98 100644 --- a/stude/accounts/migrations/0001_initial.py +++ b/stude/accounts/migrations/0001_initial.py @@ -1,4 +1,4 @@ -# Generated by Django 4.2.3 on 2023-07-09 10:57 +# Generated by Django 4.2.3 on 2023-07-18 07:43 import accounts.models import django.contrib.auth.models diff --git a/stude/accounts/migrations/0002_initial.py b/stude/accounts/migrations/0002_initial.py index e6a7875..c0e486a 100644 --- a/stude/accounts/migrations/0002_initial.py +++ b/stude/accounts/migrations/0002_initial.py @@ -1,4 +1,4 @@ -# Generated by Django 4.2.3 on 2023-07-09 10:57 +# Generated by Django 4.2.3 on 2023-07-18 07:43 from django.db import migrations, models import django.db.models.deletion @@ -9,11 +9,11 @@ class Migration(migrations.Migration): initial = True dependencies = [ - ('courses', '0002_initial'), + ('auth', '0012_alter_user_first_name_max_length'), + ('year_levels', '0001_initial'), ('accounts', '0001_initial'), ('semesters', '0001_initial'), - ('year_levels', '0001_initial'), - ('auth', '0012_alter_user_first_name_max_length'), + ('courses', '0002_initial'), ('subjects', '0001_initial'), ] @@ -36,7 +36,7 @@ class Migration(migrations.Migration): migrations.AddField( model_name='customuser', name='subjects', - field=models.ManyToManyField(related_name='SubjectStudent_user', through='subjects.SubjectStudent', to='subjects.subject'), + field=models.ManyToManyField(to='subjects.subject'), ), migrations.AddField( model_name='customuser', diff --git a/stude/accounts/models.py b/stude/accounts/models.py index e34a78c..0ce2968 100644 --- a/stude/accounts/models.py +++ b/stude/accounts/models.py @@ -53,8 +53,7 @@ class CustomUser(AbstractUser): on_delete=models.SET_NULL, null=True ) - subjects = models.ManyToManyField( - 'subjects.Subject', through='subjects.SubjectStudent', related_name='SubjectStudent_user') + subjects = models.ManyToManyField('subjects.Subject') @property def full_name(self): @@ -78,3 +77,22 @@ def create_superuser(sender, **kwargs): # Activate the superuser superuser.is_active = True superuser.save() + + User = CustomUser + username = 'keannu125' + email = os.getenv('DJANGO_ADMIN_EMAIL') + password = os.getenv('DJANGO_ADMIN_PASSWORD') + first_name = 'Keannu' + last_name = 'Bernasol' + # course = 'Bachelor of Science in Information Technology' + # year_level = '1st Year' + # semester = '1st Semester' + + if not CustomUser.objects.filter(username=username).exists(): + # Create the superuser with is_active set to False + user = CustomUser.objects.create( + username=username, email=email, password=password, first_name=first_name, last_name=last_name) + + # Activate the superuser + user.is_active = True + user.save() diff --git a/stude/courses/migrations/0001_initial.py b/stude/courses/migrations/0001_initial.py index 970281d..e6da990 100644 --- a/stude/courses/migrations/0001_initial.py +++ b/stude/courses/migrations/0001_initial.py @@ -1,7 +1,6 @@ -# Generated by Django 4.2.3 on 2023-07-09 10:57 +# Generated by Django 4.2.3 on 2023-07-18 07:43 from django.db import migrations, models -import django.db.models.deletion class Migration(migrations.Migration): @@ -20,11 +19,4 @@ class Migration(migrations.Migration): ('shortname', models.CharField(max_length=16)), ], ), - migrations.CreateModel( - name='SubjectCourse', - fields=[ - ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('course', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='courses.course')), - ], - ), ] diff --git a/stude/courses/migrations/0002_initial.py b/stude/courses/migrations/0002_initial.py index cb6eb76..a4f4500 100644 --- a/stude/courses/migrations/0002_initial.py +++ b/stude/courses/migrations/0002_initial.py @@ -1,7 +1,6 @@ -# Generated by Django 4.2.3 on 2023-07-09 10:57 +# Generated by Django 4.2.3 on 2023-07-18 07:43 from django.db import migrations, models -import django.db.models.deletion class Migration(migrations.Migration): @@ -14,14 +13,9 @@ class Migration(migrations.Migration): ] operations = [ - migrations.AddField( - model_name='subjectcourse', - name='subject', - field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='subjects.subject'), - ), migrations.AddField( model_name='course', name='subjects', - field=models.ManyToManyField(related_name='SubjectCourse_course', through='courses.SubjectCourse', to='subjects.subject'), + field=models.ManyToManyField(related_name='SubjectCourse_course', through='subjects.SubjectCourse', to='subjects.subject'), ), ] diff --git a/stude/courses/migrations/0003_remove_subjectcourse_course_and_more.py b/stude/courses/migrations/0003_remove_subjectcourse_course_and_more.py deleted file mode 100644 index f658037..0000000 --- a/stude/courses/migrations/0003_remove_subjectcourse_course_and_more.py +++ /dev/null @@ -1,21 +0,0 @@ -# Generated by Django 4.2.3 on 2023-07-10 09:34 - -from django.db import migrations - - -class Migration(migrations.Migration): - - dependencies = [ - ('courses', '0002_initial'), - ] - - operations = [ - migrations.RemoveField( - model_name='subjectcourse', - name='course', - ), - migrations.RemoveField( - model_name='subjectcourse', - name='subject', - ), - ] diff --git a/stude/courses/migrations/0004_alter_course_subjects_delete_subjectcourse.py b/stude/courses/migrations/0004_alter_course_subjects_delete_subjectcourse.py deleted file mode 100644 index e01c19b..0000000 --- a/stude/courses/migrations/0004_alter_course_subjects_delete_subjectcourse.py +++ /dev/null @@ -1,22 +0,0 @@ -# Generated by Django 4.2.3 on 2023-07-10 09:34 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('subjects', '0002_subjectcourse_alter_subject_courses'), - ('courses', '0003_remove_subjectcourse_course_and_more'), - ] - - operations = [ - migrations.AlterField( - model_name='course', - name='subjects', - field=models.ManyToManyField(related_name='SubjectCourse_course', through='subjects.SubjectCourse', to='subjects.subject'), - ), - migrations.DeleteModel( - name='SubjectCourse', - ), - ] diff --git a/stude/landmarks/migrations/0001_initial.py b/stude/landmarks/migrations/0001_initial.py index ed22085..0018b9c 100644 --- a/stude/landmarks/migrations/0001_initial.py +++ b/stude/landmarks/migrations/0001_initial.py @@ -1,4 +1,4 @@ -# Generated by Django 4.2.3 on 2023-07-10 07:37 +# Generated by Django 4.2.3 on 2023-07-18 07:43 import django.contrib.gis.db.models.fields from django.db import migrations, models diff --git a/stude/semesters/migrations/0001_initial.py b/stude/semesters/migrations/0001_initial.py index e4928e7..bc479f6 100644 --- a/stude/semesters/migrations/0001_initial.py +++ b/stude/semesters/migrations/0001_initial.py @@ -1,4 +1,4 @@ -# Generated by Django 4.2.3 on 2023-07-09 10:57 +# Generated by Django 4.2.3 on 2023-07-18 07:43 from django.db import migrations, models diff --git a/stude/student_status/migrations/0001_initial.py b/stude/student_status/migrations/0001_initial.py index 80b2aa9..dc438b5 100644 --- a/stude/student_status/migrations/0001_initial.py +++ b/stude/student_status/migrations/0001_initial.py @@ -1,4 +1,4 @@ -# Generated by Django 4.2.3 on 2023-07-09 10:57 +# Generated by Django 4.2.3 on 2023-07-18 07:43 from django.conf import settings import django.contrib.gis.db.models.fields @@ -12,6 +12,7 @@ class Migration(migrations.Migration): dependencies = [ ('accounts', '0002_initial'), + ('landmarks', '0001_initial'), ] operations = [ @@ -22,6 +23,7 @@ class Migration(migrations.Migration): ('location', django.contrib.gis.db.models.fields.PointField(blank=True, null=True, srid=4326)), ('active', models.BooleanField(default=False)), ('timestamp', models.DateField(auto_now_add=True)), + ('landmark', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='landmarks.landmark')), ], ), ] diff --git a/stude/student_status/migrations/0002_initial.py b/stude/student_status/migrations/0002_initial.py index 68f3c08..54f0607 100644 --- a/stude/student_status/migrations/0002_initial.py +++ b/stude/student_status/migrations/0002_initial.py @@ -1,4 +1,4 @@ -# Generated by Django 4.2.3 on 2023-07-09 10:57 +# Generated by Django 4.2.3 on 2023-07-18 07:43 from django.db import migrations, models import django.db.models.deletion @@ -9,8 +9,8 @@ class Migration(migrations.Migration): initial = True dependencies = [ - ('student_status', '0001_initial'), ('study_groups', '0001_initial'), + ('student_status', '0001_initial'), ('subjects', '0001_initial'), ] diff --git a/stude/student_status/migrations/0003_studentstatus_landmark.py b/stude/student_status/migrations/0003_studentstatus_landmark.py deleted file mode 100644 index 0d53ac6..0000000 --- a/stude/student_status/migrations/0003_studentstatus_landmark.py +++ /dev/null @@ -1,20 +0,0 @@ -# Generated by Django 4.2.3 on 2023-07-14 14:51 - -from django.db import migrations, models -import django.db.models.deletion - - -class Migration(migrations.Migration): - - dependencies = [ - ('landmarks', '0001_initial'), - ('student_status', '0002_initial'), - ] - - operations = [ - migrations.AddField( - model_name='studentstatus', - name='landmark', - field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='landmarks.landmark'), - ), - ] diff --git a/stude/study_groups/migrations/0001_initial.py b/stude/study_groups/migrations/0001_initial.py index f3ff07d..5f1af60 100644 --- a/stude/study_groups/migrations/0001_initial.py +++ b/stude/study_groups/migrations/0001_initial.py @@ -1,4 +1,4 @@ -# Generated by Django 4.2.3 on 2023-07-09 10:57 +# Generated by Django 4.2.3 on 2023-07-18 07:43 import django.contrib.gis.db.models.fields from django.db import migrations, models diff --git a/stude/studygroup_messages/migrations/0001_initial.py b/stude/studygroup_messages/migrations/0001_initial.py index b793e23..8dc01db 100644 --- a/stude/studygroup_messages/migrations/0001_initial.py +++ b/stude/studygroup_messages/migrations/0001_initial.py @@ -1,4 +1,4 @@ -# Generated by Django 4.2.3 on 2023-07-09 10:57 +# Generated by Django 4.2.3 on 2023-07-18 07:43 from django.conf import settings from django.db import migrations, models diff --git a/stude/subjects/admin.py b/stude/subjects/admin.py index 573fffc..77d9077 100644 --- a/stude/subjects/admin.py +++ b/stude/subjects/admin.py @@ -1,5 +1,5 @@ from django.contrib import admin -from .models import Subject, SubjectStudent, SubjectCourse, SubjectSemester, SubjectYearLevel +from .models import Subject, SubjectCourse, SubjectSemester, SubjectYearLevel class SubjectAdmin(admin.ModelAdmin): @@ -7,7 +7,6 @@ class SubjectAdmin(admin.ModelAdmin): admin.site.register(Subject, SubjectAdmin) -admin.site.register(SubjectStudent) admin.site.register(SubjectCourse) admin.site.register(SubjectSemester) admin.site.register(SubjectYearLevel) diff --git a/stude/subjects/migrations/0001_initial.py b/stude/subjects/migrations/0001_initial.py index 1db88fd..c83d0ea 100644 --- a/stude/subjects/migrations/0001_initial.py +++ b/stude/subjects/migrations/0001_initial.py @@ -1,4 +1,4 @@ -# Generated by Django 4.2.3 on 2023-07-09 10:57 +# Generated by Django 4.2.3 on 2023-07-18 07:43 from django.conf import settings from django.db import migrations, models @@ -10,8 +10,8 @@ class Migration(migrations.Migration): initial = True dependencies = [ - migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('semesters', '0001_initial'), + migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('courses', '0001_initial'), ('year_levels', '0001_initial'), ] @@ -23,26 +23,50 @@ class Migration(migrations.Migration): ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('name', models.CharField(max_length=64)), ('code', models.CharField(max_length=16)), - ('courses', models.ManyToManyField(related_name='SubjectCourse_subject', through='courses.SubjectCourse', to='courses.course')), - ('semester', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='semesters.semester')), ], ), migrations.CreateModel( - name='SubjectStudent', + name='SubjectYearLevel', fields=[ ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('subject', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='subjects.subject')), - ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), + ('year_level', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='year_levels.year_level')), ], ), + migrations.CreateModel( + name='SubjectSemester', + fields=[ + ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('semester', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='semesters.semester')), + ('subject', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='subjects.subject')), + ], + ), + migrations.CreateModel( + name='SubjectCourse', + fields=[ + ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('course', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='courses.course')), + ('subject', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='subjects.subject')), + ], + ), + migrations.AddField( + model_name='subject', + name='courses', + field=models.ManyToManyField(related_name='SubjectCourse_subject', through='subjects.SubjectCourse', to='courses.course'), + ), + migrations.AddField( + model_name='subject', + name='semesters', + field=models.ManyToManyField(related_name='SubjectSemester_subject', through='subjects.SubjectSemester', to='semesters.semester'), + ), migrations.AddField( model_name='subject', name='students', - field=models.ManyToManyField(related_name='SubjectStudent_subject', through='subjects.SubjectStudent', to=settings.AUTH_USER_MODEL), + field=models.ManyToManyField(to=settings.AUTH_USER_MODEL), ), migrations.AddField( model_name='subject', - name='year_level', - field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='Year_Level_name', to='year_levels.year_level'), + name='year_levels', + field=models.ManyToManyField(related_name='SubjectYearLevel_subject', through='subjects.SubjectYearLevel', to='year_levels.year_level'), ), ] diff --git a/stude/subjects/migrations/0002_subjectcourse_alter_subject_courses.py b/stude/subjects/migrations/0002_subjectcourse_alter_subject_courses.py deleted file mode 100644 index 2fc3a92..0000000 --- a/stude/subjects/migrations/0002_subjectcourse_alter_subject_courses.py +++ /dev/null @@ -1,28 +0,0 @@ -# Generated by Django 4.2.3 on 2023-07-10 09:34 - -from django.db import migrations, models -import django.db.models.deletion - - -class Migration(migrations.Migration): - - dependencies = [ - ('courses', '0003_remove_subjectcourse_course_and_more'), - ('subjects', '0001_initial'), - ] - - operations = [ - migrations.CreateModel( - name='SubjectCourse', - fields=[ - ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('course', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='courses.course')), - ('subject', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='subjects.subject')), - ], - ), - migrations.AlterField( - model_name='subject', - name='courses', - field=models.ManyToManyField(related_name='SubjectCourse_subject', through='subjects.SubjectCourse', to='courses.course'), - ), - ] diff --git a/stude/subjects/migrations/0003_remove_subject_semester_remove_subject_year_level_and_more.py b/stude/subjects/migrations/0003_remove_subject_semester_remove_subject_year_level_and_more.py deleted file mode 100644 index 2224b8b..0000000 --- a/stude/subjects/migrations/0003_remove_subject_semester_remove_subject_year_level_and_more.py +++ /dev/null @@ -1,50 +0,0 @@ -# Generated by Django 4.2.3 on 2023-07-11 06:38 - -from django.db import migrations, models -import django.db.models.deletion - - -class Migration(migrations.Migration): - - dependencies = [ - ('semesters', '0001_initial'), - ('year_levels', '0001_initial'), - ('subjects', '0002_subjectcourse_alter_subject_courses'), - ] - - operations = [ - migrations.RemoveField( - model_name='subject', - name='semester', - ), - migrations.RemoveField( - model_name='subject', - name='year_level', - ), - migrations.CreateModel( - name='SubjectYearLevel', - fields=[ - ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('subject', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='subjects.subject')), - ('year_level', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='year_levels.year_level')), - ], - ), - migrations.CreateModel( - name='SubjectSemester', - fields=[ - ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('semester', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='semesters.semester')), - ('subject', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='subjects.subject')), - ], - ), - migrations.AddField( - model_name='subject', - name='semester', - field=models.ManyToManyField(related_name='SubjectSemester_subject', through='subjects.SubjectSemester', to='semesters.semester'), - ), - migrations.AddField( - model_name='subject', - name='year_level', - field=models.ManyToManyField(related_name='SubjectYearLevel_subject', through='subjects.SubjectYearLevel', to='year_levels.year_level'), - ), - ] diff --git a/stude/subjects/migrations/0004_rename_courses_subject_course.py b/stude/subjects/migrations/0004_rename_courses_subject_course.py deleted file mode 100644 index 61e8482..0000000 --- a/stude/subjects/migrations/0004_rename_courses_subject_course.py +++ /dev/null @@ -1,18 +0,0 @@ -# Generated by Django 4.2.3 on 2023-07-17 12:43 - -from django.db import migrations - - -class Migration(migrations.Migration): - - dependencies = [ - ('subjects', '0003_remove_subject_semester_remove_subject_year_level_and_more'), - ] - - operations = [ - migrations.RenameField( - model_name='subject', - old_name='courses', - new_name='course', - ), - ] diff --git a/stude/subjects/migrations/0005_rename_course_subject_courses.py b/stude/subjects/migrations/0005_rename_course_subject_courses.py deleted file mode 100644 index eb87ae8..0000000 --- a/stude/subjects/migrations/0005_rename_course_subject_courses.py +++ /dev/null @@ -1,18 +0,0 @@ -# Generated by Django 4.2.3 on 2023-07-17 13:11 - -from django.db import migrations - - -class Migration(migrations.Migration): - - dependencies = [ - ('subjects', '0004_rename_courses_subject_course'), - ] - - operations = [ - migrations.RenameField( - model_name='subject', - old_name='course', - new_name='courses', - ), - ] diff --git a/stude/subjects/migrations/0006_rename_semester_subject_semesters_and_more.py b/stude/subjects/migrations/0006_rename_semester_subject_semesters_and_more.py deleted file mode 100644 index 97ce344..0000000 --- a/stude/subjects/migrations/0006_rename_semester_subject_semesters_and_more.py +++ /dev/null @@ -1,23 +0,0 @@ -# Generated by Django 4.2.3 on 2023-07-17 13:16 - -from django.db import migrations - - -class Migration(migrations.Migration): - - dependencies = [ - ('subjects', '0005_rename_course_subject_courses'), - ] - - operations = [ - migrations.RenameField( - model_name='subject', - old_name='semester', - new_name='semesters', - ), - migrations.RenameField( - model_name='subject', - old_name='year_level', - new_name='year_levels', - ), - ] diff --git a/stude/subjects/models.py b/stude/subjects/models.py index 8be9592..6b1b801 100644 --- a/stude/subjects/models.py +++ b/stude/subjects/models.py @@ -9,8 +9,7 @@ class Subject(models.Model): code = models.CharField(max_length=16) courses = models.ManyToManyField( 'courses.Course', through='subjects.SubjectCourse', related_name='SubjectCourse_subject') - students = models.ManyToManyField( - 'accounts.CustomUser', through='subjects.SubjectStudent', related_name='SubjectStudent_subject') + students = models.ManyToManyField('accounts.CustomUser', blank=True) year_levels = models.ManyToManyField( 'year_levels.Year_Level', through='subjects.SubjectYearLevel', related_name='SubjectYearLevel_subject') @@ -22,16 +21,6 @@ class Subject(models.Model): return self.name -class SubjectStudent(models.Model): - user = models.ForeignKey( - 'accounts.CustomUser', on_delete=models.CASCADE) - subject = models.ForeignKey( - 'subjects.Subject', on_delete=models.CASCADE) - - def __str__(self): - return f'User={self.user.full_name}, Subject={self.subject.name}' - - class SubjectCourse(models.Model): subject = models.ForeignKey('subjects.Subject', on_delete=models.CASCADE) course = models.ForeignKey( diff --git a/stude/subjects/serializers.py b/stude/subjects/serializers.py index d9312d3..5980ba5 100644 --- a/stude/subjects/serializers.py +++ b/stude/subjects/serializers.py @@ -3,9 +3,7 @@ from .models import Subject from courses.models import Course from year_levels.models import Year_Level from semesters.models import Semester -from year_levels.serializers import YearLevelSerializer -from semesters.serializers import SemesterSerializer -from courses.serializers import CourseSerializer +from accounts.models import CustomUser class SubjectSerializer(serializers.ModelSerializer): diff --git a/stude/subjects/urls.py b/stude/subjects/urls.py index 6c0d533..3cecd12 100644 --- a/stude/subjects/urls.py +++ b/stude/subjects/urls.py @@ -1,7 +1,6 @@ from django.urls import include, path -from .views import SubjectListView -from .views import SubjectByYearSemesterView - +from .views import SubjectByYearSemesterView, SubjectListView +from rest_framework import routers urlpatterns = [ path('', SubjectListView.as_view()), path('//', diff --git a/stude/subjects/views.py b/stude/subjects/views.py index bdcec22..60818f5 100644 --- a/stude/subjects/views.py +++ b/stude/subjects/views.py @@ -1,4 +1,4 @@ -from rest_framework import generics +from rest_framework import generics, viewsets from .models import Subject from .serializers import SubjectSerializer from rest_framework.views import APIView diff --git a/stude/year_levels/migrations/0001_initial.py b/stude/year_levels/migrations/0001_initial.py index 6e58573..2541862 100644 --- a/stude/year_levels/migrations/0001_initial.py +++ b/stude/year_levels/migrations/0001_initial.py @@ -1,4 +1,4 @@ -# Generated by Django 4.2.3 on 2023-07-09 10:57 +# Generated by Django 4.2.3 on 2023-07-18 07:43 from django.db import migrations, models