]> git.openstreetmap.org Git - osqa.git/blob - forum/settings/email.py
Merging jambazov --> trunk.
[osqa.git] / forum / settings / email.py
1 from base import Setting, SettingSet\r
2 from django.utils.translation import ugettext_lazy as _\r
3 from django.forms.widgets import PasswordInput\r
4 from django.forms.widgets import RadioSelect\r
5 from forms import TestEmailSettingsWidget\r
6 \r
7 EMAIL_SET = SettingSet('email', _('Email settings'), _("Email server and other email related settings."), 50)\r
8 \r
9 EMAIL_SUBSCRIBE_CHOICES = (\r
10     ('y', _('Users are subscribed by default')),\r
11     ('n', _('Users are not subscribed by default')),\r
12 )\r
13 \r
14 INITIAL_EMAIL_SUBSCRIBE_OPTION = Setting('INITIAL_EMAIL_SUBSCRIBE_OPTION', 'y', EMAIL_SET, dict(\r
15 label = _("Default email subscription"),\r
16 widget=RadioSelect,\r
17 choices=EMAIL_SUBSCRIBE_CHOICES,\r
18 help_text = _("Choose what should be the default email subscription status while registering."),\r
19 required=False))\r
20 \r
21 TEST_EMAIL_SETTINGS = Setting('TEST_EMAIL_SETTINGS', '', EMAIL_SET, dict(\r
22 label = _("E-Mail settings test"),\r
23 help_text = _("Test the current E-Mail configuration."),\r
24 required=False,\r
25 widget=TestEmailSettingsWidget))\r
26 \r
27 EMAIL_HOST = Setting('EMAIL_HOST', '', EMAIL_SET, dict(\r
28 label = _("Email Server"),\r
29 help_text = _("The SMTP server through which your application will be sending emails."),\r
30 required=False))\r
31 \r
32 EMAIL_PORT = Setting('EMAIL_PORT', 25, EMAIL_SET, dict(\r
33 label = _("Email Port"),\r
34 help_text = _("The port on which your SMTP server is listening to. Usually this is 25, but can be something else."),\r
35 required=False))\r
36 \r
37 EMAIL_HOST_USER = Setting('EMAIL_HOST_USER', '', EMAIL_SET, dict(\r
38 label = _("Email User"),\r
39 help_text = _("The username for your SMTP connection."),\r
40 required=False))\r
41 \r
42 EMAIL_HOST_PASSWORD = Setting('EMAIL_HOST_PASSWORD', '', EMAIL_SET, dict(\r
43 label = _("Email Password"),\r
44 help_text = _("The password for your SMTP connection."),\r
45 required=False,\r
46 widget=PasswordInput))\r
47 \r
48 EMAIL_USE_TLS = Setting('EMAIL_USE_TLS', False, EMAIL_SET, dict(\r
49 label = _("Use TLS"),\r
50 help_text = _("Whether to use TLS for authentication with your SMTP server."),\r
51 required=False))\r
52 \r
53 DEFAULT_FROM_EMAIL = Setting('DEFAULT_FROM_EMAIL', '', EMAIL_SET, dict(\r
54 label = _("Site 'from' Email Address"),\r
55 help_text = _("The address that will show up on the 'from' field on emails sent by your website."),\r
56 required=False))\r
57 \r
58 EMAIL_SUBJECT_PREFIX = Setting('EMAIL_SUBJECT_PREFIX', '', EMAIL_SET, dict(\r
59 label = _("Email Subject Prefix"),\r
60 help_text = _("Every email sent through your website will have the subject prefixed by this string. It's usually a good idea to have such a prefix so your users can easily set up a filter on theyr email clients."),\r
61 required=False))\r
62 \r
63 EMAIL_FOOTER_TEXT = Setting(u'EMAIL_FOOTER_TEXT', '', EMAIL_SET, dict(\r
64 label = _("Email Footer Text"),\r
65 help_text = _("Email footer text, usually \"CAN SPAM\" compliance, or the physical address of the organization running the website. See <a href=\"http://en.wikipedia.org/wiki/CAN-SPAM_Act_of_2003\">this Wikipedia article</a> for more info."),\r
66 required=False))\r
67 \r
68 EMAIL_BORDER_COLOR = Setting('EMAIL_BORDER_COLOR', '#e5ebf8', EMAIL_SET, dict(\r
69 label = _("Email Border Color"),\r
70 help_text = _("The outter border color of the email base template"),\r
71 required=False))\r
72 \r
73 EMAIL_PARAGRAPH_STYLE = Setting('EMAIL_PARAGRAPH_STYLE', "color:#333333;font-family:'helvetica neue', arial, Helvetica, sans-serif;line-height:18px;font-size:14px;margin-top:10px;", EMAIL_SET, dict(\r
74 label = _("Email Paragraph Style"),\r
75 help_text = _("A valid css string to be used to style email paragraphs (the P tag)."),\r
76 required=False))\r
77 \r
78 EMAIL_ANCHOR_STYLE = Setting('EMAIL_ANCHOR_STYLE', "text-decoration:none;color:#3060a8;font-weight:bold;", EMAIL_SET, dict(\r
79 label = _("Email Link Style"),\r
80 help_text = _("A valid css string to be used to style email links (the A tag)."),\r
81 required=False))\r
82 \r
83 \r
84 \r
85 EMAIL_DIGEST_FLAG = Setting('EMAIL_DIGEST_FLAG', None)\r