diff options
author | Alban Gruin | 2017-09-07 22:50:12 +0200 |
---|---|---|
committer | Alban Gruin | 2017-09-07 22:50:12 +0200 |
commit | daa35602eeee6b15cea2b4e92a0556de2a1b4905 (patch) | |
tree | caadda2aaa26190255c57f8f54142a7792dcc9fb /admin.py | |
parent | ec90d2b98716ef88a3c7f4f673042c04dcbde03a (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.py | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -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) |