admin.py 331 Bytes
Newer Older
1
from django.contrib import admin
2
from website.models import Facility, Schedule, OpenTime
3
4
5
6


class OpenTimeInline(admin.TabularInline):
    model = OpenTime
7
    fk_name = 'schedule'
8
9
10
11
12


class ScheduleAdmin(admin.ModelAdmin):
    inlines = [OpenTimeInline, ]

13

14
admin.site.register(Facility)
15
admin.site.register(Schedule, ScheduleAdmin)