1
Fork 0
This repository has been archived on 2023-03-26. You can view files and clone it, but cannot push or open issues or pull requests.
theorangeone.net-legacy/project/blog/models.py

19 lines
472 B
Python
Raw Normal View History

2016-12-15 22:00:42 +00:00
from project.common.blocks import build_stream_field
2016-11-24 21:44:08 +00:00
from wagtail.wagtailcore.models import Page
2016-12-16 19:39:09 +00:00
from wagtail.wagtailadmin.edit_handlers import StreamFieldPanel
2016-11-24 21:44:08 +00:00
from wagtail.wagtailsearch import index
2016-11-25 20:23:02 +00:00
from project.common.models import Entity
2016-11-24 21:44:08 +00:00
2016-11-25 20:23:02 +00:00
class BlogPage(Entity):
2016-12-08 11:15:05 +00:00
body = build_stream_field()
2016-11-24 21:44:08 +00:00
search_fields = Page.search_fields + [
index.SearchField('body'),
]
content_panels = Page.content_panels + [
2016-12-08 11:15:05 +00:00
StreamFieldPanel('body'),
2016-11-24 21:44:08 +00:00
]