summaryrefslogtreecommitdiffstats
path: root/forum/conf/site_settings.py
blob: 05d0c1c8f908b27a8e9e7ed6509aaac723ce4f7d (plain)
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
"""
Q&A website settings - title, desctiption, basic urls
keywords
"""
from forum.conf.settings_wrapper import settings
from livesettings import ConfigurationGroup, StringValue
from django.utils.translation import ugettext as _
from django.utils.html import escape
from forum import const

QA_SITE_SETTINGS = ConfigurationGroup(
                    'QA_SITE_SETTINGS',
                    _('Q&A forum website parameters and urls')
                )

settings.register(
    StringValue(
        QA_SITE_SETTINGS,
        'APP_TITLE',
        default=u'ASKBOT: Open Source Q&A Forum',
        description=_('Site title for the Q&A forum')
    )
)

settings.register(
    StringValue(
        QA_SITE_SETTINGS,
        'APP_KEYWORDS',
        default=u'ASKBOT,CNPROG,forum,community',
        description=_('Comma separated list of Q&A site keywords')
    )
)

settings.register(
    StringValue(
        QA_SITE_SETTINGS,
        'APP_COPYRIGHT',
        default='Copyright ASKBOT, 2010. Some rights reserved under creative commons license.',
        description=_('Copyright message to show in the footer')
    )
)

settings.register(
    StringValue(
        QA_SITE_SETTINGS,
        'APP_DESCRIPTION',
        default='Open source question and answer forum written in Python and Django',
        description=_('Site description for the search engines')
    )
)

settings.register(
    StringValue(
        QA_SITE_SETTINGS,
        'APP_SHORT_NAME',
        default=_('Askbot'),
        hidden=True,
        description=_('Short name for your Q&A forum')
    )
)

settings.register(
    StringValue(
        QA_SITE_SETTINGS,
        'APP_URL',
        default='http://askbot.org',
        description=_('Base URL for your Q&A forum, must start with http or https'),
    )
)

settings.register(
    StringValue(
        QA_SITE_SETTINGS,
        'GREETING_URL',
        default='/' + _('faq/'),#cannot reverse url here, unfortunately, must be absolute also
        hidden=True,
        description=_('Link shown in the greeting message shown to the anonymous user'),
        help_text=_('If you change this url from the default - '
                    'then you will also probably want to adjust translation of '
                    'the following string: ') + '"' 
                    + escape(const.GREETING_FOR_ANONYMOUS_USER + '"'
                    ' You can find this string in your locale django.po file'
                    )
    )
)

settings.register(
    StringValue(
        QA_SITE_SETTINGS,
        'FEEDBACK_SITE_URL',
        description=_('Feedback site URL'),
        help_text=_('If left empty, a simple internal feedback form will be used instead')
    )
)