bornhack-website/camps/admin.py

40 lines
649 B
Python
Raw Normal View History

2015-10-03 01:07:05 +00:00
from django.contrib import admin
from .models import Camp, Day, Expense, Signup
2015-10-03 01:07:05 +00:00
@admin.register(Expense)
class ExpenseAdmin(admin.ModelAdmin):
pass
class ExpenseInlineAdmin(admin.TabularInline):
model = Expense
@admin.register(Signup)
class SignupAdmin(admin.ModelAdmin):
pass
class SignupInlineAdmin(admin.TabularInline):
model = Signup
@admin.register(Day)
class DayAdmin(admin.ModelAdmin):
pass
class DayInlineAdmin(admin.TabularInline):
model = Day
2015-10-03 01:07:05 +00:00
@admin.register(Camp)
class CampAdmin(admin.ModelAdmin):
inlines = [
DayInlineAdmin,
2015-10-03 01:07:05 +00:00
ExpenseInlineAdmin,
SignupInlineAdmin
]