1 from django.contrib import admin
2 from django import forms
3 from modeltranslation.admin import TranslationAdmin
7 class BannerAdmin(TranslationAdmin):
10 'text_color', 'background_color',
11 'priority', 'since', 'until',
12 'show_members', 'staff_preview']
15 admin.site.register(models.Banner, BannerAdmin)
18 class DTITForm(forms.ModelForm):
20 model = models.DynamicTextInsertText
23 'background_color': forms.TextInput(attrs={"type": "color"}),
24 'text_color': forms.TextInput(attrs={"type": "color"}),
28 class DynamicTextInsertTextInline(admin.TabularInline):
29 model = models.DynamicTextInsertText
31 fields = ['text', 'image', 'own_colors', 'background_color', 'text_color']
37 class DynamicTextInsertAdmin(admin.ModelAdmin):
38 list_display = ['paragraphs']
39 inlines = [DynamicTextInsertTextInline]
42 admin.site.register(models.DynamicTextInsert, DynamicTextInsertAdmin)