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/common/models.py

24 lines
593 B
Python
Raw Normal View History

from django.db import models
2016-11-24 21:44:08 +00:00
from wagtail.wagtailcore.models import Page
from wagtail.wagtailcore.fields import RichTextField
from wagtail.wagtailadmin.edit_handlers import FieldPanel
2016-11-25 20:23:02 +00:00
class Entity(Page):
is_home = False
class Meta:
abstract = True
class SectionIndexPage(Entity):
name = models.CharField(max_length=250)
2016-11-24 21:44:08 +00:00
intro = RichTextField(blank=True)
hide_list = models.BooleanField(default=False)
2016-11-24 21:44:08 +00:00
content_panels = Page.content_panels + [
FieldPanel('name'),
FieldPanel('intro', classname="full"),
FieldPanel('hide_list')
2016-11-24 21:44:08 +00:00
]