from django.db import models from wagtail.admin.panels import FieldPanel from wagtail.contrib.settings.models import BaseSiteSetting, register_setting @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, ) panels = [ FieldPanel("title"), FieldPanel("logo"), ]