from django.db import models from wagtail.admin.panels import FieldPanel from wagtail.contrib.settings.models import BaseSiteSetting, register_setting from wagtail.fields import RichTextField @register_setting class SiteSettings(BaseSiteSetting): title = models.CharField(max_length=32, blank=True) logo = models.ForeignKey( "wagtailimages.Image", on_delete=models.CASCADE, related_name="+", null=True, blank=True, ) footer = RichTextField(blank=True) panels = [ FieldPanel("title"), FieldPanel("logo"), FieldPanel("footer"), ]