1 from base import Setting, SettingSet
2 from django.forms.widgets import Textarea, RadioSelect
3 from django.utils.translation import ugettext_lazy as _
5 STATIC_PAGE_REGISTRY = Setting('STATIC_PAGE_REGISTRY', {})
7 CSS_SET = SettingSet('css', 'Custom CSS', "Define some custom css you can use to override the default css.", 2000,
10 USE_CUSTOM_CSS = Setting('USE_CUSTOM_CSS', False, CSS_SET, dict(
11 label = _("Use custom CSS"),
12 help_text = _("Do you want to use custom CSS."),
15 CUSTOM_CSS = Setting('CUSTOM_CSS', '', CSS_SET, dict(
16 label = _("Custom CSS"),
17 help_text = _("Your custom CSS."),
18 widget=Textarea(attrs={'rows': '25'}),
21 HEAD_AND_FOOT_SET = SettingSet('headandfoot', 'Header and Footer', "Adds a custom header and/or footer to your page",
22 2000, can_preview=True)
24 USE_CUSTOM_HEADER = Setting('USE_CUSTOM_HEADER', False, HEAD_AND_FOOT_SET, dict(
25 label = _("Use custom header"),
26 help_text = _("Do you want to use a custom header."),
29 CUSTOM_HEADER = Setting('CUSTOM_HEADER', '', HEAD_AND_FOOT_SET, dict(
30 label = _("Custom Header"),
31 help_text = _("Your custom header."),
32 widget=Textarea(attrs={'rows': '25'}),
35 USE_ANNOUNCEMENT_BAR = Setting('USE_ANNOUNCEMENT_BAR', False, HEAD_AND_FOOT_SET, dict(
36 label = _("Show announcement bar"),
37 help_text = _("Some piece of content that goes under the search bar and can be used for announcements, etc."),
40 ANNOUNCEMENT_BAR = Setting('ANNOUNCEMENT_BAR', '', HEAD_AND_FOOT_SET, dict(
41 label = _("Announcement bar"),
42 help_text = _("The announcement bar content."),
43 widget=Textarea(attrs={'rows': '25'}),
46 USE_CUSTOM_FOOTER = Setting('USE_CUSTOM_FOOTER', False, HEAD_AND_FOOT_SET, dict(
47 label = _("Use custom footer"),
48 help_text = _("Do you want to use a custom footer."),
51 CUSTOM_FOOTER = Setting('CUSTOM_FOOTER', '', HEAD_AND_FOOT_SET, dict(
52 label = _("Custom Footer"),
53 help_text = _("Your custom footer."),
54 widget=Textarea(attrs={'rows': '25'}),
57 CUSTOM_FOOTER_MODE_CHOICES = (
58 ('replace', _('Replace default footer')),
59 ('above', _('Above default footer')),
60 ('below', _('Below default footer')),
63 CUSTOM_FOOTER_MODE = Setting('CUSTOM_FOOTER_MODE', 'replace', HEAD_AND_FOOT_SET, dict(
64 label = _("Custom Footer Mode"),
65 help_text = _("How your custom footer will appear."),
67 choices=CUSTOM_FOOTER_MODE_CHOICES,
70 HEAD_SET = SettingSet('head', '<head>', "Define some custom elements to include in the head section of every page.",
71 2000, can_preview=True)
73 USE_CUSTOM_HEAD = Setting('USE_CUSTOM_HEAD', False, HEAD_SET, dict(
74 label = _("Use custom Head elements"),
75 help_text = _("Do you want to use custom head elements."),
78 CUSTOM_HEAD = Setting('CUSTOM_HEAD', '', HEAD_SET, dict(
79 label = _("Custom Head"),
80 help_text = _("Your custom Head elements."),
81 widget=Textarea(attrs={'rows': '25'}),