aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlban Gruin2017-09-10 11:59:32 +0200
committerAlban Gruin2017-09-12 21:40:37 +0200
commit5a391f46fafee98b653f9c64219ad17844f7e340 (patch)
tree8d5886f052b5ce91da062fcd144d62f902a039db
parent32bd236f2c53bc8dfd515018a7ae0ec06f65c115 (diff)
Filtrage des cours et des groupes par l’emploi du temps et non par son nom
-rw-r--r--admin.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/admin.py b/admin.py
index fff2c19..16e34f3 100644
--- a/admin.py
+++ b/admin.py
@@ -44,7 +44,8 @@ class GroupAdmin(admin.ModelAdmin):
(None, {"fields": ("name", "celcat_name", "timetable",)}),
("Groupes", {"fields": ("mention", "subgroup", "td", "tp", "parent",)}),)
list_display = ("name", "timetable",)
- list_filter = ("timetable__name",)
+ list_filter = ("timetable",)
+ ordering = ("timetable",)
readonly_fields = ("celcat_name", "mention", "subgroup", "td", "tp",)
@@ -60,5 +61,5 @@ class CourseAdmin(admin.ModelAdmin):
("Horaires", {"fields": ("begin", "end",)}),
("Remarques", {"fields": ("notes",)}),)
list_display = ("name", "type", "timetable", "begin", "end",)
- list_filter = ("type", "timetable__name", "groups",)
+ list_filter = ("type", "timetable", "groups",)
ordering = ("begin",)