Archived
1
Fork 0
This repository has been archived on 2024-10-15. You can view files and clone it, but cannot push or open issues or pull requests.
lps-wagtail/lps/home/models.py

26 lines
665 B
Python
Raw Permalink Normal View History

from django.db import models
2024-06-12 15:29:33 +02:00
from wagtail.admin.panels import FieldPanel
from wagtail.fields import RichTextField
from wagtail.models import Page
class HomePage(Page):
image = models.ForeignKey(
"wagtailimages.Image",
null=True,
blank=True,
on_delete=models.SET_NULL,
related_name="+",
help_text="Image page d'accueil",
)
hero_text = models.CharField(
blank=True, max_length=1024, help_text="Phrase d'accueil"
)
2024-06-12 15:29:33 +02:00
body = RichTextField(blank=True)
content_panels = Page.content_panels + [
FieldPanel("image"),
FieldPanel("hero_text"),
2024-06-12 15:29:33 +02:00
FieldPanel("body"),
]