-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathviews.py
More file actions
51 lines (38 loc) · 981 Bytes
/
Copy pathviews.py
File metadata and controls
51 lines (38 loc) · 981 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
"""
View classes for all possible section types.
"""
from cms.decorators import section_view
from cms.views import ContactSectionFormView, SectionView
from django.utils.translation import gettext_lazy as _
@section_view
class Text(SectionView):
"""
A section that displays text.
"""
verbose_name = _("Text")
template_name = "text.html"
fields = ["content"]
@section_view
class Images(SectionView):
"""
A section that displays images.
"""
verbose_name = _("Image(s)")
template_name = "images.html"
fields = ["images"]
@section_view
class Video(SectionView):
"""
A section that displays a video.
"""
verbose_name = _("Video")
template_name = "video.html"
fields = ["video"]
@section_view
class Contact(ContactSectionFormView):
"""
A section that displays a contact form.
"""
verbose_name = _("Contact")
template_name = "contact.html"
fields = ["content", "href", "subject"]