mirror of
https://github.com/ae-utbm/sith.git
synced 2026-10-05 18:34:15 +00:00
add models
This commit is contained in:
1 parent
f211d0ff85
commit
7044a06546
6 files changed
+267
-5
No files matched your search
@@ -1 +1,17 @@
|
||||
# Register your models here.
|
||||
from django.contrib import admin
|
||||
|
||||
from timetable.models import Timetable, TimetableSlot
|
||||
|
||||
|
||||
class TimetableSlotInline(admin.TabularInline):
|
||||
model = TimetableSlot
|
||||
|
||||
|
||||
@admin.register(Timetable)
|
||||
class TimetableAdmin(admin.ModelAdmin):
|
||||
list_display = ("user", "semester")
|
||||
search_fields = ("user__nick_name", "user__first_name", "user__last_name")
|
||||
autocomplete_fields = ("user",)
|
||||
inlines = (TimetableSlotInline,)
|
||||
list_select_related = ("user",)
|
||||
Reference in new issue
Block a user