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
|
"""
Settings that modify processing of user text input
"""
from askbot.conf.settings_wrapper import settings
from askbot.deps.livesettings import ConfigurationGroup
from askbot.deps.livesettings import BooleanValue, StringValue
from django.utils.translation import ugettext as _
import askbot
from askbot import const
import os
MARKUP = ConfigurationGroup(
'MARKUP',
_('Markup formatting')
)
settings.register(
BooleanValue(
MARKUP,
'MARKUP_CODE_FRIENDLY',
description = _('Enable code-friendly Markdown'),
help_text = _(
'If checked, underscore characters will not '
'trigger italic or bold formatting - '
'bold and italic text can still be marked up '
'with asterisks. Note that "MathJax support" '
'implicitly turns this feature on, because '
'underscores are heavily used in LaTeX input.'
),
default = False
)
)
settings.register(
BooleanValue(
MARKUP,
'ENABLE_MATHJAX',
description=_('Mathjax support (rendering of LaTeX)'),
help_text=_(
'If you enable this feature, '
'<a href="%(url)s">mathjax</a> must be '
'installed on your server in its own directory.'
) % {
'url': const.DEPENDENCY_URLS['mathjax'],
},
default = False
)
)
settings.register(
StringValue(
MARKUP,
'MATHJAX_BASE_URL',
description=_('Base url of MathJax deployment'),
help_text=_(
'Note - <strong>MathJax is not included with '
'askbot</strong> - you should deploy it yourself, '
'preferably at a separate domain and enter url '
'pointing to the "mathjax" directory '
'(for example: http://mysite.com/mathjax)'
),
default = ''
)
)
|