summaryrefslogtreecommitdiffstats
path: root/askbot/conf/email_text.py
blob: 30be298292493d370c81f55e272de2805ef9b95a (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
from askbot.conf.settings_wrapper import settings
from askbot.conf.super_groups import LOGIN_USERS_COMMUNICATION
from askbot.deps import livesettings
from django.utils.translation import ugettext_lazy as _

EMAIL_TEXT = livesettings.ConfigurationGroup(
            'EMAIL_TEXT',
            _('Email template phrases'),
            super_group=LOGIN_USERS_COMMUNICATION
        )

settings.register(
    livesettings.StringValue(
        EMAIL_TEXT,
        'EMAIL_TEXT_SHORT_WELCOME',
        description = _('Short welcome message, for subject line'),
        default = _('Welcome to {{ SITE_NAME }}!'),
        help_text = _(
            '<b>NOTE: All email text settings allow placeholders: {{ USER_NAME }}, {{ SITE_NAME }} and {{ SITE_LINK }}.</b>'
        )
    )
)

settings.register(
    livesettings.LongStringValue(
        EMAIL_TEXT,
        'EMAIL_TEXT_LONG_WELCOME',
        description = _('Longer welcome message, for email body'),
        default = _('<p>Please visit {{ SITE_NAME }} at {{ SITE_LINK }}, we look forward to your posts.</p>'),
    )
)

settings.register(
    livesettings.LongStringValue(
        EMAIL_TEXT,
        'EMAIL_TEXT_FOOTER',
        description=_('Email footer'),
        default=_('<p>Sincerely,<br>{{ SITE_NAME }} Administrator</p>')
    )
)

settings.register(
    livesettings.LongStringValue(
        EMAIL_TEXT,
        'EMAIL_TEXT_BATCH_ALERT_HEADER',
        description=_('Header for the batch email alerts'),
        default=_("""<p>Dear {{ USER_NAME }},</p>
<p>{{ SITE_NAME }} has these updates, please have a look:</p>""")
    )
)