aboutsummaryrefslogtreecommitdiff
path: root/admin.py
diff options
context:
space:
mode:
authorAlban Gruin2017-09-07 22:46:54 +0200
committerAlban Gruin2017-09-07 22:46:54 +0200
commitec90d2b98716ef88a3c7f4f673042c04dcbde03a (patch)
treeffd2f720a12ba35faf8132705ee5044bf0c4e935 /admin.py
parent36b4c60aacae827b5ff8b6125bdfd70d7cf2a3a0 (diff)
Création d’un modèle année pour remplacer le champ année des emplois
du temps
Diffstat (limited to 'admin.py')
-rw-r--r--admin.py12
1 files changed, 9 insertions, 3 deletions
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)