From 1561cb829a48d49d36242db89fa4490144767065 Mon Sep 17 00:00:00 2001 From: Alban Gruin Date: Thu, 7 Sep 2017 17:02:27 +0200 Subject: Séparation de l’année et de la mention dans le modèle Timetable --- admin.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'admin.py') diff --git a/admin.py b/admin.py index 2408623..ca2fed9 100644 --- a/admin.py +++ b/admin.py @@ -20,8 +20,8 @@ from .models import Timetable, LastUpdate, Group, Subscription, Room, Course @admin.register(Timetable) class TimetableAdmin(admin.ModelAdmin): - prepopulated_fields = {"slug": ("name",)} - list_display = ("name", "url",) + prepopulated_fields = {"slug": ("year", "name",)} + list_display = ("full_name", "url",) @admin.register(LastUpdate) -- cgit v1.2.1 From a79e87a3ecfd505846c04f7949b1036a102430ed Mon Sep 17 00:00:00 2001 From: Alban Gruin Date: Thu, 7 Sep 2017 20:56:22 +0200 Subject: Affichage du champ updated_at dans l’interface d’administration --- admin.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'admin.py') diff --git a/admin.py b/admin.py index ca2fed9..fba80c6 100644 --- a/admin.py +++ b/admin.py @@ -26,7 +26,7 @@ class TimetableAdmin(admin.ModelAdmin): @admin.register(LastUpdate) class LastUpdateAdmin(admin.ModelAdmin): - list_display = ("timetable", "week", "year", "date",) + list_display = ("timetable", "week", "year", "date", "updated_at",) list_filter = ("timetable__name",) -- cgit v1.2.1 From ec90d2b98716ef88a3c7f4f673042c04dcbde03a Mon Sep 17 00:00:00 2001 From: Alban Gruin Date: Thu, 7 Sep 2017 22:46:54 +0200 Subject: Création d’un modèle année pour remplacer le champ année des emplois du temps --- admin.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'admin.py') diff --git a/admin.py b/admin.py index fba80c6..1493b0f 100644 --- a/admin.py +++ b/admin.py @@ -15,13 +15,19 @@ # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. from django.contrib import admin -from .models import Timetable, LastUpdate, Group, Subscription, Room, Course +from .models import Timetable, LastUpdate, Group, Subscription, Room, Course, Year + + +@admin.register(Year) +class YearAdmin(admin.ModelAdmin): + pass @admin.register(Timetable) class TimetableAdmin(admin.ModelAdmin): - prepopulated_fields = {"slug": ("year", "name",)} - list_display = ("full_name", "url",) + prepopulated_fields = {"slug": ("name",)} + list_display = ("name", "year", "url",) + list_filter = ("year",) @admin.register(LastUpdate) -- cgit v1.2.1 From daa35602eeee6b15cea2b4e92a0556de2a1b4905 Mon Sep 17 00:00:00 2001 From: Alban Gruin Date: Thu, 7 Sep 2017 22:50:12 +0200 Subject: Le champ slug du modèle Year est auto-rempli Correction du filtre des emplois du temps --- admin.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'admin.py') diff --git a/admin.py b/admin.py index 1493b0f..b244eb3 100644 --- a/admin.py +++ b/admin.py @@ -20,14 +20,15 @@ from .models import Timetable, LastUpdate, Group, Subscription, Room, Course, Ye @admin.register(Year) class YearAdmin(admin.ModelAdmin): - pass + prepopulated_fields = {"slug": ("name",)} + list_display = ("name",) @admin.register(Timetable) class TimetableAdmin(admin.ModelAdmin): prepopulated_fields = {"slug": ("name",)} list_display = ("name", "year", "url",) - list_filter = ("year",) + list_filter = ("year__name",) @admin.register(LastUpdate) -- cgit v1.2.1 From 49e56d97e5a126f66d1d52b5de45befe603893b2 Mon Sep 17 00:00:00 2001 From: Alban Gruin Date: Thu, 7 Sep 2017 23:31:54 +0200 Subject: Remplacement de la licence GPL 2 par la licence AGPL 3 --- admin.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'admin.py') diff --git a/admin.py b/admin.py index b244eb3..66da316 100644 --- a/admin.py +++ b/admin.py @@ -1,18 +1,17 @@ # Copyright (C) 2017 Alban Gruin # -# celcatsanitizer is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# celcatsanitizer is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as published +# by the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # celcatsanitizer is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. +# GNU Affero General Public License for more details. # -# You should have received a copy of the GNU General Public License along -# with celcatsanitizer; if not, write to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +# You should have received a copy of the GNU Affero General Public License +# along with celcatsanitizer. If not, see . from django.contrib import admin from .models import Timetable, LastUpdate, Group, Subscription, Room, Course, Year -- cgit v1.2.1 From c7fce37ad4c8dee76f5d58eafefd0c73a03ea00c Mon Sep 17 00:00:00 2001 From: Alban Gruin Date: Sat, 9 Sep 2017 14:56:17 +0200 Subject: Suppression de l’envoi des mails --- admin.py | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'admin.py') diff --git a/admin.py b/admin.py index 66da316..2fc0e78 100644 --- a/admin.py +++ b/admin.py @@ -14,7 +14,7 @@ # along with celcatsanitizer. If not, see . from django.contrib import admin -from .models import Timetable, LastUpdate, Group, Subscription, Room, Course, Year +from .models import Timetable, LastUpdate, Group, Room, Course, Year @admin.register(Year) @@ -46,12 +46,6 @@ class GroupAdmin(admin.ModelAdmin): readonly_fields = ("celcat_name", "mention", "subgroup", "td", "tp",) -@admin.register(Subscription) -class SubscriptionAdmin(admin.ModelAdmin): - list_display = ("email", "group", "active",) - readonly_fields = ("token",) - - @admin.register(Room) class RoomAdmin(admin.ModelAdmin): pass -- cgit v1.2.1