2014-05-08 16:59:35 +00:00
|
|
|
from django.conf import settings
|
|
|
|
from django.utils.translation import ugettext_lazy as _
|
|
|
|
|
2015-04-26 13:53:00 +00:00
|
|
|
from orchestra.settings import ORCHESTRA_BASE_DOMAIN, Setting
|
2015-03-31 12:39:08 +00:00
|
|
|
|
2014-05-08 16:59:35 +00:00
|
|
|
|
2015-04-26 13:53:00 +00:00
|
|
|
ACCOUNTS_TYPES = Setting('ACCOUNTS_TYPES', (
|
2015-04-27 12:24:17 +00:00
|
|
|
('INDIVIDUAL', _("Individual")),
|
|
|
|
('ASSOCIATION', _("Association")),
|
|
|
|
('CUSTOMER', _("Customer")),
|
|
|
|
('COMPANY', _("Company")),
|
|
|
|
('PUBLICBODY', _("Public body")),
|
|
|
|
('STAFF', _("Staff")),
|
|
|
|
('FRIEND', _("Friend")),
|
|
|
|
),
|
|
|
|
validators=[Setting.validate_choices]
|
|
|
|
)
|
2014-05-08 16:59:35 +00:00
|
|
|
|
2015-03-31 12:39:08 +00:00
|
|
|
|
2015-04-26 13:53:00 +00:00
|
|
|
ACCOUNTS_DEFAULT_TYPE = Setting('ACCOUNTS_DEFAULT_TYPE', 'INDIVIDUAL', choices=ACCOUNTS_TYPES)
|
2014-05-08 16:59:35 +00:00
|
|
|
|
|
|
|
|
2015-04-26 13:53:00 +00:00
|
|
|
ACCOUNTS_LANGUAGES = Setting('ACCOUNTS_LANGUAGES', (
|
2015-04-27 12:24:17 +00:00
|
|
|
('EN', _('English')),
|
|
|
|
),
|
|
|
|
validators=[Setting.validate_choices]
|
|
|
|
)
|
2014-05-08 16:59:35 +00:00
|
|
|
|
|
|
|
|
2015-04-26 13:53:00 +00:00
|
|
|
ACCOUNTS_DEFAULT_LANGUAGE = Setting('ACCOUNTS_DEFAULT_LANGUAGE', 'EN', choices=ACCOUNTS_LANGUAGES)
|
2014-10-23 15:38:46 +00:00
|
|
|
|
|
|
|
|
2015-04-27 12:24:17 +00:00
|
|
|
ACCOUNTS_SYSTEMUSER_MODEL = Setting('ACCOUNTS_SYSTEMUSER_MODEL', 'systemusers.SystemUser',
|
|
|
|
validators=[Setting.validate_model_label],
|
2015-03-31 12:39:08 +00:00
|
|
|
)
|
2014-08-19 18:59:23 +00:00
|
|
|
|
|
|
|
|
2015-04-26 13:53:00 +00:00
|
|
|
ACCOUNTS_MAIN_PK = Setting('ACCOUNTS_MAIN_PK', 1)
|
2014-10-20 15:51:24 +00:00
|
|
|
|
|
|
|
|
2015-04-26 13:53:00 +00:00
|
|
|
ACCOUNTS_CREATE_RELATED = Setting('ACCOUNTS_CREATE_RELATED', (
|
2014-10-20 15:51:24 +00:00
|
|
|
# <model>, <key field>, <kwargs>, <help_text>
|
|
|
|
('mailboxes.Mailbox',
|
|
|
|
'name',
|
|
|
|
{
|
|
|
|
'name': 'account.username',
|
|
|
|
'password': 'account.password',
|
|
|
|
},
|
|
|
|
_("Designates whether to creates a related mailbox with the same name and password or not."),
|
|
|
|
),
|
|
|
|
('domains.Domain',
|
|
|
|
'name',
|
|
|
|
{
|
2015-04-05 22:34:47 +00:00
|
|
|
'name': '"%s.{}" % account.username.replace("_", "-")'.format(ORCHESTRA_BASE_DOMAIN),
|
2014-10-20 15:51:24 +00:00
|
|
|
},
|
2015-04-05 22:34:47 +00:00
|
|
|
_("Designates whether to creates a related subdomain <username>.{} or not.".format(ORCHESTRA_BASE_DOMAIN)),
|
2014-10-20 15:51:24 +00:00
|
|
|
),
|
|
|
|
))
|
2014-11-27 19:17:26 +00:00
|
|
|
|
|
|
|
|
2015-04-26 13:53:00 +00:00
|
|
|
ACCOUNTS_SERVICE_REPORT_TEMPLATE = Setting('ACCOUNTS_SERVICE_REPORT_TEMPLATE',
|
2015-03-31 12:39:08 +00:00
|
|
|
'admin/accounts/account/service_report.html'
|
|
|
|
)
|