1 changed files with 27 additions and 0 deletions
@ -0,0 +1,27 @@ |
|||||
|
from django.db import models |
||||
|
|
||||
|
from modelcluster.fields import ParentalKey |
||||
|
|
||||
|
from wagtail.core.models import Page, Orderable |
||||
|
from wagtail.core.fields import RichTextField |
||||
|
from wagtail.admin.edit_handlers import FieldPanel, InlinePanel |
||||
|
from wagtail.images.edit_handlers import ImageChooserPanel |
||||
|
from wagtail.search import index |
||||
|
|
||||
|
|
||||
|
class AktualityIndexPage(Page): |
||||
|
pass |
||||
|
|
||||
|
|
||||
|
class Aktualita(Page): |
||||
|
date = models.DateField("Post date") |
||||
|
body = RichTextField(blank=True) |
||||
|
|
||||
|
search_fields = Page.search_fields + [ |
||||
|
index.SearchField('body'), |
||||
|
] |
||||
|
|
||||
|
content_panels = Page.content_panels + [ |
||||
|
FieldPanel('body', classname="full"), |
||||
|
] |
||||
|
|
Loading…
Reference in new issue