StudE-Backend/stude/subjects/admin.py

12 lines
268 B
Python
Raw Normal View History

2023-06-27 18:15:31 +08:00
from django.contrib import admin
2023-06-27 18:42:34 +08:00
from courses.models import Course
from .models import Subject, SubjectStudent
2023-06-27 18:15:31 +08:00
2023-06-27 18:42:34 +08:00
class SubjectAdmin(admin.ModelAdmin):
filter_horizontal = ['courses']
admin.site.register(Subject, SubjectAdmin)
admin.site.register(SubjectStudent)