diff options
Diffstat (limited to 'admin.py')
-rw-r--r-- | admin.py | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -16,10 +16,12 @@ 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_visible.short_description = "Afficher les groupes sélectionnés" @@ -66,7 +68,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",) |