django-simplecms/example/views.py

32 wiersze
697 B
Python
Czysty Zwykły widok Historia

from cms.decorators import section_view
from cms.views import ContactSectionFormView, SectionView
from django.utils.translation import gettext_lazy as _
2021-07-03 23:59:48 +00:00
@section_view
class Text(SectionView):
2021-07-03 23:59:48 +00:00
verbose_name = _("Text")
template_name = "text.html"
fields = ["content"]
2021-07-03 23:59:48 +00:00
@section_view
class Images(SectionView):
2021-07-03 23:59:48 +00:00
verbose_name = _("Image(s)")
template_name = "images.html"
fields = ["images"]
2021-07-03 23:59:48 +00:00
@section_view
class Video(SectionView):
2021-07-03 23:59:48 +00:00
verbose_name = _("Video")
template_name = "video.html"
fields = ["video"]
2021-07-03 23:59:48 +00:00
@section_view
class Contact(ContactSectionFormView):
2021-07-03 23:59:48 +00:00
verbose_name = _("Contact")
template_name = "contact.html"
fields = ["content", "href"]