aboutsummaryrefslogtreecommitdiff
path: root/admin.py
diff options
context:
space:
mode:
authorAlban Gruin2017-11-19 01:10:29 +0100
committerAlban Gruin2017-11-27 12:11:31 +0100
commit582b1d2be865cc0fba9aa4726404f4370d0b80c5 (patch)
tree2999d3bf80bb9ec4452facd8adfc1bf6960bed70 /admin.py
parent700d4218b84c45bb37a150f0ec1c9bf6866b3bf3 (diff)
Séparation en deux modèles des emplois du temps : un pour l’affichage,
l’autre pour les sources
Diffstat (limited to 'admin.py')
-rw-r--r--admin.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/admin.py b/admin.py
index 011ad73..717a386 100644
--- a/admin.py
+++ b/admin.py
@@ -14,7 +14,7 @@
# along with celcatsanitizer. If not, see <http://www.gnu.org/licenses/>.
from django.contrib import admin
-from .models import Timetable, Group, Room, Course, Year
+from .models import Course, Group, Room, Timetable, TimetableFront, Year
def make_hidden(modeladmin, request, queryset):
queryset.update(hidden=True)
@@ -34,8 +34,13 @@ class YearAdmin(admin.ModelAdmin):
@admin.register(Timetable)
class TimetableAdmin(admin.ModelAdmin):
+ list_display = ("url", "last_update_date",)
+
+
+@admin.register(TimetableFront)
+class TimetableFrontAdmin(admin.ModelAdmin):
prepopulated_fields = {"slug": ("name",)}
- list_display = ("name", "year", "url",)
+ list_display = ("name", "year", "source",)
list_filter = ("year__name",)
ordering = ("year", "name",)