summaryrefslogtreecommitdiffstats
path: root/forum/conf/external_keys.py
blob: f43e11203dc1e11791bc7ec5c888fc3a6fb2efdc (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
"""
External service key settings
"""
from forum.conf.settings_wrapper import settings
from livesettings import ConfigurationGroup, StringValue
from django.utils.translation import ugettext as _
from django.conf import settings as django_settings

EXTERNAL_KEYS = ConfigurationGroup(
                    'EXTERNAL_KEYS',
                    _('Keys to connect the site with external services like Facebook, etc.')
                )

settings.register(
    StringValue(
        EXTERNAL_KEYS,
        'GOOGLE_SITEMAP_CODE',
        description=_('Google site verification key'),
        help_text=_(
                        'This key helps google index your site '
                        'please obtain is at '
                        '<a href="%(google_webmasters_tools_url)s">'
                        'google webmasters tools site</a>'
                    ) % {'google_webmasters_tools_url':
                        'https://www.google.com/webmasters/tools/home?hl=' \
                        + django_settings.LANGUAGE_CODE}
    )
)

settings.register(
    StringValue(
        EXTERNAL_KEYS,
        'GOOGLE_ANALYTICS_KEY',
        description=_('Google Analytics key'),
        help_text=_(
                        'Obtain is at <a href="%(ga_site)s">'
                        'Google Analytics</a> site, if you '
                        'wish to use Google Analytics to monitor '
                        'your site'
                    ) % {'ga_site':'http://www.google.com/intl/%s/analytics/' \
                            % django_settings.LANGUAGE_CODE }
    )
)

settings.register(
    StringValue(
        EXTERNAL_KEYS,
        'RECAPTCHA_PRIVATE_KEY',
        description=_('Recaptcha private key') + ' - does not work yet',
        hidden=True,
        help_text=_(
                        'Recaptcha is a tool that helps distinguish '
                        'real people from annoying spam robots. '
                        'Please get this and a public key at '
                        'the <a href="http://recaptcha.net">recaptcha.net</a>'
                    )
    )
)

settings.register(
    StringValue(
        EXTERNAL_KEYS,
        'RECAPTCHA_PUBLIC_KEY',
        hidden=True,
        description=_('Recaptcha public key') + ' - does not work yet'
    )
)

settings.register(
    StringValue(
        EXTERNAL_KEYS,
        'FB_API_KEY',
        description=_('Facebook public API key') + ' - does not work yet',
        hidden=True,
        help_text=_(
                     'Facebook API key and Facebook secret '
                     'allow to use Facebook Connect login method '
                     'at your site. Please obtain these keys '
                     'at <a href="http://www.facebook.com/developers/createapp.php">'
                     'facebook create app</a> site'
                    )
    )

)

settings.register(
    StringValue(
        EXTERNAL_KEYS,
        'FB_SECRET',
        hidden=True,
        description=_('Facebook secret key') + ' - does not work yet'
    )
)