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_CUSTOM_FOOTER = Setting('USE_CUSTOM_FOOTER', False, HEAD_AND_FOOT_SET, dict(
36 label = _("Use custom footer"),
37 help_text = _("Do you want to use a custom footer."),
40 CUSTOM_FOOTER = Setting('CUSTOM_FOOTER', '', HEAD_AND_FOOT_SET, dict(
41 label = _("Custom Footer"),
42 help_text = _("Your custom footer."),
43 widget=Textarea(attrs={'rows': '25'}),
46 CUSTOM_FOOTER_MODE_CHOICES = (
47 ('replace', _('Replace default footer')),
48 ('above', _('Above default footer')),
49 ('below', _('Below default footer')),
52 CUSTOM_FOOTER_MODE = Setting('CUSTOM_FOOTER_MODE', 'replace', HEAD_AND_FOOT_SET, dict(
53 label = _("Custom Footer Mode"),
54 help_text = _("How your custom footer will appear."),
56 choices=CUSTOM_FOOTER_MODE_CHOICES,
59 HEAD_SET = SettingSet('head', '<head>', "Define some custom elements to include in the head section of every page.",
60 2000, can_preview=True)
62 USE_CUSTOM_HEAD = Setting('USE_CUSTOM_HEAD', False, HEAD_SET, dict(
63 label = _("Use custom Head elements"),
64 help_text = _("Do you want to use custom head elements."),
67 CUSTOM_HEAD = Setting('CUSTOM_HEAD', '', HEAD_SET, dict(
68 label = _("Custom Head"),
69 help_text = _("Your custom Head elements."),
70 widget=Textarea(attrs={'rows': '25'}),