diff options
Diffstat (limited to 'admin.py')
-rw-r--r-- | admin.py | 12 |
1 files changed, 9 insertions, 3 deletions
@@ -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) |