diff options
author | Alban Gruin | 2019-09-01 20:47:49 +0200 |
---|---|---|
committer | Alban Gruin | 2019-09-01 20:47:49 +0200 |
commit | 00d70c4d65967987c254c72f8bef5fda991f859b (patch) | |
tree | 670b2a78bfeb151096cfa844d6b48559dfc3641b /admin.py | |
parent | fe83f55800f78ff6ced9a13cf5a9c22fde0ead12 (diff) | |
parent | a6eaecf48f63c37cf851386a45cd4b25ac3ed1e0 (diff) |
Merge branch 'futur'
Diffstat (limited to 'admin.py')
-rw-r--r-- | admin.py | 16 |
1 files changed, 9 insertions, 7 deletions
@@ -1,4 +1,4 @@ -# Copyright (C) 2017-2018 Alban Gruin +# Copyright (C) 2017-2019 Alban Gruin # # celcatsanitizer is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published @@ -14,7 +14,7 @@ # along with celcatsanitizer. If not, see <http://www.gnu.org/licenses/>. from django.contrib import admin -from .models import Course, Group, Room, Source, Timetable, Year +from .models import Course, Group, Module, Room, Source, Timetable, Year def make_hidden(modeladmin, request, queryset): @@ -38,7 +38,7 @@ class YearAdmin(admin.ModelAdmin): @admin.register(Source) class SourceAdmin(admin.ModelAdmin): - list_display = ("url", "last_update_date",) + list_display = ("url", "metadata", "last_update_date",) @admin.register(Timetable) @@ -62,7 +62,7 @@ class GroupAdmin(admin.ModelAdmin): actions = (make_hidden, make_visible,) -@admin.register(Room) +@admin.register(Room, Module) class RoomAdmin(admin.ModelAdmin): prepopulated_fields = {"slug": ("name",)} list_display = ("name",) @@ -72,10 +72,12 @@ class RoomAdmin(admin.ModelAdmin): @admin.register(Course) class CourseAdmin(admin.ModelAdmin): fieldsets = ( - (None, {"fields": ("name", "type", "source", "groups", "rooms", - "last_update",)}), + (None, {"fields": ("name", "type", "source", "groups", "rooms",)}), ("Horaires", {"fields": ("begin", "end",)}), - ("Remarques", {"fields": ("notes",)}),) + ("Remarques", {"fields": ("notes",)}), + ("Avancé", {"fields": ("celcat_id", "last_update", "buggy",), + "classes": ("collapse",)}),) list_display = ("name", "type", "source", "begin", "end",) list_filter = ("type", "source__timetables", "groups",) ordering = ("begin",) + readonly_fields = ("celcat_id", "last_update",) |