瀏覽代碼

Enable scheduled publishing feature for FooterText snippet

Sage Abdullah 2 年之前
父節點
當前提交
ae3f2f2396
共有 1 個文件被更改,包括 8 次插入1 次删除
  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):