aboutsummaryrefslogtreecommitdiff
path: root/admin.py
diff options
context:
space:
mode:
authorAlban Gruin2018-01-27 17:56:45 +0100
committerAlban Gruin2018-01-27 18:13:25 +0100
commitc9388e29b2f9ee18a9e190683a8a33fb710684c5 (patch)
tree1d9402e02719110d3a0f15b74500b57afe0d2fd4 /admin.py
parent465c1c13f2e5a77f296de92d4b5b14cf319c68c5 (diff)
PEP8
Diffstat (limited to 'admin.py')
-rw-r--r--admin.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/admin.py b/admin.py
index 5af6cb1..dcac794 100644
--- a/admin.py
+++ b/admin.py
@@ -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",)