diff options
Diffstat (limited to 'admin.py')
-rw-r--r-- | admin.py | 11 |
1 files changed, 8 insertions, 3 deletions
@@ -1,4 +1,4 @@ -# Copyright (C) 2017 Alban Gruin +# Copyright (C) 2017-2018 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 @@ -16,12 +16,16 @@ from django.contrib import admin from .models import Course, Group, Room, Source, Timetable, Year + def make_hidden(modeladmin, request, queryset): queryset.update(hidden=True) -make_hidden.short_description = "Cacher les groupes sélectionnés" + def make_visible(modeladmin, request, queryset): queryset.update(hidden=False) + + +make_hidden.short_description = "Cacher les groupes sélectionnés" make_visible.short_description = "Afficher les groupes sélectionnés" @@ -66,7 +70,8 @@ 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", + "last_update",)}), ("Horaires", {"fields": ("begin", "end",)}), ("Remarques", {"fields": ("notes",)}),) list_display = ("name", "type", "source", "begin", "end",) |