You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
812 B
26 lines
812 B
from django.db import models
|
|
from wagtail.wagtailadmin.edit_handlers import StreamFieldPanel, FieldPanel
|
|
from wagtail.wagtailcore import blocks
|
|
from wagtail.wagtailcore.fields import StreamField
|
|
from wagtail.wagtailcore.models import Page
|
|
from wagtail.wagtailimages.blocks import ImageChooserBlock
|
|
|
|
__author__ = 'PekopT'
|
|
|
|
|
|
class CmsPage(Page):
|
|
body = StreamField([
|
|
('heading', blocks.CharBlock(classname="full title")),
|
|
('paragraph', blocks.RichTextBlock()),
|
|
('image', ImageChooserBlock()),
|
|
])
|
|
date = models.DateField("Дата размещения")
|
|
|
|
content_panels = Page.content_panels + [
|
|
FieldPanel('date'),
|
|
StreamFieldPanel('body'),
|
|
]
|
|
|
|
# promote_panels = [
|
|
# MultiFieldPanel(Page.promote_panels, "Common page configuration"),
|
|
# ]
|
|
|