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, can_preview=True)
9 USE_CUSTOM_CSS = Setting('USE_CUSTOM_CSS', False, CSS_SET, dict(
10 label = _("Use custom CSS"),
11 help_text = _("Do you want to use custom CSS."),
14 CUSTOM_CSS = Setting('CUSTOM_CSS', '', CSS_SET, dict(
15 label = _("Custom CSS"),
16 help_text = _("Your custom CSS."),
17 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", 2000, can_preview=True)
23 USE_CUSTOM_HEADER = Setting('USE_CUSTOM_HEADER', False, HEAD_AND_FOOT_SET, dict(
24 label = _("Use custom header"),
25 help_text = _("Do you want to use a custom header."),
28 CUSTOM_HEADER = Setting('CUSTOM_HEADER', '', HEAD_AND_FOOT_SET, dict(
29 label = _("Custom Header"),
30 help_text = _("Your custom header."),
31 widget=Textarea(attrs={'rows': '25'}),
34 USE_CUSTOM_FOOTER = Setting('USE_CUSTOM_FOOTER', False, HEAD_AND_FOOT_SET, dict(
35 label = _("Use custom footer"),
36 help_text = _("Do you want to use a custom footer."),
39 CUSTOM_FOOTER = Setting('CUSTOM_FOOTER', '', HEAD_AND_FOOT_SET, dict(
40 label = _("Custom Footer"),
41 help_text = _("Your custom footer."),
42 widget=Textarea(attrs={'rows': '25'}),
45 CUSTOM_FOOTER_MODE_CHOICES = (
46 ('replace', _('Replace default footer')),
47 ('above', _('Above default footer')),
48 ('below', _('Below default footer')),
51 CUSTOM_FOOTER_MODE = Setting('CUSTOM_FOOTER_MODE', 'replace', HEAD_AND_FOOT_SET, dict(
52 label = _("Custom Footer Mode"),
53 help_text = _("How your custom footer will appear."),
55 choices=CUSTOM_FOOTER_MODE_CHOICES,