2016-12-25 14:52:55 +00:00
|
|
|
from django.contrib import admin
|
2016-12-28 23:15:13 +00:00
|
|
|
from .models import *
|
|
|
|
|
2016-12-25 14:52:55 +00:00
|
|
|
|
2018-02-11 16:55:15 +00:00
|
|
|
@admin.register(InfoItem)
|
|
|
|
class InfoItemAdmin(admin.ModelAdmin):
|
|
|
|
list_filter = ['category', 'category__camp',]
|
|
|
|
list_display = ['headline',]
|
|
|
|
|
|
|
|
|
|
|
|
class InfoItemInlineAdmin(admin.StackedInline):
|
|
|
|
model = InfoItem
|
|
|
|
list_filter = ['category', 'category__camp',]
|
|
|
|
list_display = ['headline',]
|
|
|
|
|
|
|
|
|
|
|
|
@admin.register(InfoCategory)
|
|
|
|
class InfoCategorydmin(admin.ModelAdmin):
|
|
|
|
list_filter = ['camp',]
|
|
|
|
list_display = ['headline',]
|
|
|
|
search_fields = ['headline', 'body']
|
|
|
|
inlines = [InfoItemInlineAdmin]
|