1 # This file is part of Wolnelektury, licensed under GNU Affero GPLv3 or later.
2 # Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information.
4 from django.contrib import admin
5 from django import forms
6 from chunks import models
7 from modeltranslation.admin import TranslationStackedInline
10 class ChunkAdmin(admin.ModelAdmin):
11 list_display = ('key', 'description',)
12 search_fields = ('key', 'content',)
14 admin.site.register(models.Chunk, ChunkAdmin)
17 class AttachmentAdmin(admin.ModelAdmin):
18 list_display = ('key',)
19 search_fields = ('key',)
21 admin.site.register(models.Attachment, AttachmentAdmin)
24 class MenuItemInline(TranslationStackedInline):
25 model = models.MenuItem
29 @admin.register(models.Menu)
30 class MenuAdmin(admin.ModelAdmin):
31 inlines = [MenuItemInline]