diff options
author | Alban Gruin | 2017-11-27 15:25:42 +0100 |
---|---|---|
committer | Alban Gruin | 2017-11-27 15:25:42 +0100 |
commit | f729db8ed67f4540eb265e848bcd71add3ff074e (patch) | |
tree | e6e55497ebf9520594d408577459e276a0848a61 /admin.py | |
parent | 582b1d2be865cc0fba9aa4726404f4370d0b80c5 (diff) |
Renommage de Timetable en Source et de TimetableFront en Timetable.
C’est à partir de ce commit que la migration fournie sur la ML est utilisable.
Diffstat (limited to 'admin.py')
-rw-r--r-- | admin.py | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -14,7 +14,7 @@ # along with celcatsanitizer. If not, see <http://www.gnu.org/licenses/>. from django.contrib import admin -from .models import Course, Group, Room, Timetable, TimetableFront, Year +from .models import Course, Group, Room, Source, Timetable, Year def make_hidden(modeladmin, request, queryset): queryset.update(hidden=True) @@ -32,13 +32,13 @@ class YearAdmin(admin.ModelAdmin): ordering = ("name",) -@admin.register(Timetable) -class TimetableAdmin(admin.ModelAdmin): +@admin.register(Source) +class SourceAdmin(admin.ModelAdmin): list_display = ("url", "last_update_date",) -@admin.register(TimetableFront) -class TimetableFrontAdmin(admin.ModelAdmin): +@admin.register(Timetable) +class TimetableAdmin(admin.ModelAdmin): prepopulated_fields = {"slug": ("name",)} list_display = ("name", "year", "source",) list_filter = ("year__name",) |