aboutsummaryrefslogtreecommitdiff
path: root/admin.py
diff options
context:
space:
mode:
authorAlban Gruin2017-09-07 22:50:12 +0200
committerAlban Gruin2017-09-07 22:50:12 +0200
commitdaa35602eeee6b15cea2b4e92a0556de2a1b4905 (patch)
treecaadda2aaa26190255c57f8f54142a7792dcc9fb /admin.py
parentec90d2b98716ef88a3c7f4f673042c04dcbde03a (diff)
Le champ slug du modèle Year est auto-rempli
Correction du filtre des emplois du temps
Diffstat (limited to 'admin.py')
-rw-r--r--admin.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/admin.py b/admin.py
index 1493b0f..b244eb3 100644
--- a/admin.py
+++ b/admin.py
@@ -20,14 +20,15 @@ from .models import Timetable, LastUpdate, Group, Subscription, Room, Course, Ye
@admin.register(Year)
class YearAdmin(admin.ModelAdmin):
- pass
+ prepopulated_fields = {"slug": ("name",)}
+ list_display = ("name",)
@admin.register(Timetable)
class TimetableAdmin(admin.ModelAdmin):
prepopulated_fields = {"slug": ("name",)}
list_display = ("name", "year", "url",)
- list_filter = ("year",)
+ list_filter = ("year__name",)
@admin.register(LastUpdate)