Skip to content

Commit 548c163

Browse files
committed
Add support for previews to social media settings
1 parent 8315e32 commit 548c163

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

bakerydemo/base/models.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -550,7 +550,7 @@ class FormPage(AbstractEmailForm):
550550

551551

552552
@register_setting(icon="cog")
553-
class GenericSettings(ClusterableModel, BaseGenericSetting):
553+
class GenericSettings(ClusterableModel, PreviewableMixin, BaseGenericSetting):
554554
mastodon_url = models.URLField(verbose_name="Mastodon URL", blank=True)
555555
github_url = models.URLField(verbose_name="GitHub URL", blank=True)
556556
organisation_url = models.URLField(verbose_name="Organisation URL", blank=True)
@@ -566,6 +566,9 @@ class GenericSettings(ClusterableModel, BaseGenericSetting):
566566
)
567567
]
568568

569+
def get_preview_template(self, request, mode_name):
570+
return "base.html"
571+
569572

570573
@register_setting(icon="site")
571574
class SiteSettings(BaseSiteSetting):

0 commit comments

Comments
 (0)