1 from base import Setting, SettingSet
2 from django.forms.widgets import Textarea, Select
3 from django.utils.translation import ugettext_lazy as _
5 from static import RENDER_CHOICES
7 SIDEBAR_SET = SettingSet('sidebar', 'Sidebar content', "Enter contents to display in the sidebar. You can use markdown and some basic html tags.", 10, True)
9 SHOW_WELCOME_BOX = Setting('SHOW_WELCOME_BOX', True, SIDEBAR_SET, dict(
10 label = _("Show the Welcome box"),
11 help_text = _("Do you want to show the welcome box when a user first visits your site."),
14 APP_INTRO = Setting('APP_INTRO', u'<p>Ask and answer questions, make the world better!</p>', SIDEBAR_SET, dict(
15 label = _("Application intro"),
16 help_text = _("The introductory page that is visible in the sidebar for anonymous users."),
19 QUESTION_TITLE_TIPS = Setting('QUESTION_TITLE_TIPS',
21 - **ask a question relevant to the |APP_TITLE| community**
22 - the title must be in the form of a question
23 - provide enough details
24 - be clear and concise
27 label = "Question title tips",
28 help_text = "Tips visible on the ask or edit questions page about the question title.",
31 QUESTION_TAG_TIPS = Setting('QUESTION_TAG_TIPS',
33 - Tags are words that will tell others what this question is about.
34 - They will help other find your question.
35 - A question can have up to |FORM_MAX_NUMBER_OF_TAGS| tags, but it must have at least |FORM_MIN_NUMBER_OF_TAGS|.
38 label = "Tagging tips",
39 help_text = "Tips visible on the ask or edit questions page about good tagging.",
43 SIDEBAR_UPPER_SHOW = Setting('SIDEBAR_UPPER_SHOW', True, SIDEBAR_SET, dict(
44 label = "Show Upper Block",
45 help_text = "Check if your pages should display the upper sidebar block.",
48 SIDEBAR_UPPER_DONT_WRAP = Setting('SIDEBAR_UPPER_DONT_WRAP', False, SIDEBAR_SET, dict(
49 label = "Don't Wrap Upper Block",
50 help_text = "Don't wrap upper block with the standard style.",
53 SIDEBAR_UPPER_TEXT = Setting('SIDEBAR_UPPER_TEXT',
55 [![WebFaction logo][2]][1]
56 ## [Reliable OSQA Hosting][1]
58 We recommend [**WebFaction**][1] for OSQA hosting. For \
59 under $10/month their reliable servers get the job done. See our \
60 [**step-by-step setup guide**](http://wiki.osqa.net/display/docs/Installing+OSQA+on+WebFaction).
62 [1]: http://www.webfaction.com?affiliate=osqa
63 [2]: /m/default/media/images/webfaction.png""", SIDEBAR_SET, dict(
64 label = "Upper Block Content",
65 help_text = " The upper sidebar block. ",
66 widget=Textarea(attrs={'rows': '10'})))
68 SIDEBAR_UPPER_RENDER_MODE = Setting('SIDEBAR_UPPER_RENDER_MODE', 'markdown', SIDEBAR_SET, dict(
69 label = _("Upper block rendering mode"),
70 help_text = _("How to render your upper block code."),
71 widget=Select(choices=RENDER_CHOICES),
75 SIDEBAR_LOWER_SHOW = Setting('SIDEBAR_LOWER_SHOW', True, SIDEBAR_SET, dict(
76 label = "Show Lower Block",
77 help_text = "Check if your pages should display the lower sidebar block.",
80 SIDEBAR_LOWER_DONT_WRAP = Setting('SIDEBAR_LOWER_DONT_WRAP', False, SIDEBAR_SET, dict(
81 label = "Don't Wrap Lower Block",
82 help_text = "Don't wrap lower block with the standard style.",
85 SIDEBAR_LOWER_TEXT = Setting('SIDEBAR_LOWER_TEXT',
87 ## Learn more about OSQA
89 The [**OSQA website**](http://www.osqa.net/) and [**OSQA wiki**](http://wiki.osqa.net/) \
90 are great resources to help you learn more about the OSQA open source Q&A system. \
91 [**Join the OSQA chat!**](http://meta.osqa.net/question/79/is-there-an-online-chat-room-or-irc-channel-for-osqa#302)
92 """, SIDEBAR_SET, dict(
93 label = "Lower Block Content",
94 help_text = " The lower sidebar block. ",
95 widget=Textarea(attrs={'rows': '10'})))
97 SIDEBAR_LOWER_RENDER_MODE = Setting('SIDEBAR_LOWER_RENDER_MODE', 'markdown', SIDEBAR_SET, dict(
98 label = _("Lower block rendering mode"),
99 help_text = _("How to render your lower block code."),
100 widget=Select(choices=RENDER_CHOICES),