Browse Source

Enable scheduled publishing feature for FooterText snippet

Sage Abdullah 2 years ago
parent
commit
ae3f2f2396
1 changed files with 8 additions and 1 deletions
  1. 8 1
      bakerydemo/base/models.py

+ 8 - 1
bakerydemo/base/models.py

@@ -3,7 +3,13 @@ from __future__ import unicode_literals
 from django.db import models
 from django.db import models
 from modelcluster.fields import ParentalKey
 from modelcluster.fields import ParentalKey
 from modelcluster.models import ClusterableModel
 from modelcluster.models import ClusterableModel
-from wagtail.admin.panels import FieldPanel, FieldRowPanel, InlinePanel, MultiFieldPanel
+from wagtail.admin.panels import (
+    FieldPanel,
+    FieldRowPanel,
+    InlinePanel,
+    MultiFieldPanel,
+    PublishingPanel,
+)
 from wagtail.contrib.forms.models import AbstractEmailForm, AbstractFormField
 from wagtail.contrib.forms.models import AbstractEmailForm, AbstractFormField
 from wagtail.fields import RichTextField, StreamField
 from wagtail.fields import RichTextField, StreamField
 from wagtail.models import Collection, DraftStateMixin, Page, RevisionMixin
 from wagtail.models import Collection, DraftStateMixin, Page, RevisionMixin
@@ -91,6 +97,7 @@ class FooterText(DraftStateMixin, RevisionMixin, models.Model):
 
 
     panels = [
     panels = [
         FieldPanel("body"),
         FieldPanel("body"),
+        PublishingPanel(),
     ]
     ]
 
 
     def __str__(self):
     def __str__(self):