1 from django.contrib import admin
2 from django import forms
3 from modeltranslation.admin import TranslationAdmin
7 class BannerAdmin(TranslationAdmin):
8 list_display = ['place', 'text', 'priority', 'since', 'until', 'show_members', 'staff_preview']
11 admin.site.register(models.Banner, BannerAdmin)
14 class DTITForm(forms.ModelForm):
16 model = models.DynamicTextInsertText
19 'background_color': forms.TextInput(attrs={"type": "color"}),
20 'text_color': forms.TextInput(attrs={"type": "color"}),
24 class DynamicTextInsertTextInline(admin.TabularInline):
25 model = models.DynamicTextInsertText
27 fields = ['text', 'image', 'own_colors', 'background_color', 'text_color']
33 class DynamicTextInsertAdmin(admin.ModelAdmin):
34 list_display = ['paragraphs']
35 inlines = [DynamicTextInsertTextInline]
38 admin.site.register(models.DynamicTextInsert, DynamicTextInsertAdmin)