Added service metric and match descriptions and fixed domain slaves without master
This commit is contained in:
parent
8f27720c69
commit
ed0e51b73f
|
@ -33,7 +33,7 @@ ACCOUNTS_CREATE_RELATED = getattr(settings, 'ACCOUNTS_CREATE_RELATED', (
|
|||
'password': 'account.password',
|
||||
'is_main': 'True',
|
||||
},
|
||||
_("Designates whether to creates a related system users with the same username and password or not."),
|
||||
_("Designates whether to creates a related system user with the same username and password or not."),
|
||||
),
|
||||
('mailboxes.Mailbox',
|
||||
'name',
|
||||
|
|
|
@ -8,6 +8,8 @@ CONTACTS_DEFAULT_EMAIL_USAGES = getattr(settings, 'CONTACTS_DEFAULT_EMAIL_USAGES
|
|||
|
||||
CONTACTS_DEFAULT_CITY = getattr(settings, 'CONTACTS_DEFAULT_CITY', 'Barcelona')
|
||||
|
||||
|
||||
CONTACTS_DEFAULT_PROVINCE = getattr(settings, 'CONTACTS_DEFAULT_PROVINCE', 'Barcelona')
|
||||
|
||||
|
||||
CONTACTS_DEFAULT_COUNTRY = getattr(settings, 'CONTACTS_DEFAULT_COUNTRY', 'Spain')
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
from django.conf import settings
|
||||
|
||||
|
||||
|
||||
DATABASES_TYPE_CHOICES = getattr(settings, 'DATABASES_TYPE_CHOICES', (
|
||||
('mysql', 'MySQL'),
|
||||
('postgres', 'PostgreSQL'),
|
||||
|
|
|
@ -32,6 +32,7 @@ MAILBOXES_VIRTUAL_ALIAS_DOMAINS_PATH = getattr(settings, 'MAILBOXES_VIRTUAL_ALIA
|
|||
MAILBOXES_VIRTUAL_MAILBOX_DEFAULT_DOMAIN = getattr(settings, 'MAILBOXES_VIRTUAL_MAILBOX_DEFAULT_DOMAIN',
|
||||
'orchestra.lan')
|
||||
|
||||
|
||||
MAILBOXES_PASSWD_PATH = getattr(settings, 'MAILBOXES_PASSWD_PATH',
|
||||
'/etc/dovecot/passwd')
|
||||
|
||||
|
|
|
@ -18,9 +18,12 @@ from .handlers import ServiceHandler
|
|||
|
||||
class Plan(models.Model):
|
||||
name = models.CharField(_("plan"), max_length=128)
|
||||
is_default = models.BooleanField(_("default"), default=False)
|
||||
is_combinable = models.BooleanField(_("combinable"), default=True)
|
||||
allow_multiple = models.BooleanField(_("allow multiple"), default=False)
|
||||
is_default = models.BooleanField(_("default"), default=False,
|
||||
help_text=_("Designates whether this plan is used by default or not."))
|
||||
is_combinable = models.BooleanField(_("combinable"), default=True,
|
||||
help_text=_("Designates whether this plan can be combined with other plans or not."))
|
||||
allow_multiple = models.BooleanField(_("allow multiple"), default=False,
|
||||
help_text=_("Designates whether this plan allow for multiple contractions."))
|
||||
|
||||
def __unicode__(self):
|
||||
return self.name
|
||||
|
@ -120,10 +123,10 @@ class Service(models.Model):
|
|||
choices=ServiceHandler.get_plugin_choices())
|
||||
is_active = models.BooleanField(_("active"), default=True)
|
||||
ignore_superusers = models.BooleanField(_("ignore superusers"), default=True,
|
||||
help_text=_("Designates whether superuser orders are marked as ignored by default or not"))
|
||||
help_text=_("Designates whether superuser orders are marked as ignored by default or not."))
|
||||
# Billing
|
||||
billing_period = models.CharField(_("billing period"), max_length=16,
|
||||
help_text=_("Renewal period for recurring invoicing"),
|
||||
help_text=_("Renewal period for recurring invoicing."),
|
||||
choices=(
|
||||
(NEVER, _("One time service")),
|
||||
(MONTHLY, _("Monthly billing")),
|
||||
|
@ -158,8 +161,7 @@ class Service(models.Model):
|
|||
tax = models.PositiveIntegerField(_("tax"), choices=settings.SERVICES_SERVICE_TAXES,
|
||||
default=settings.SERVICES_SERVICE_DEFAUL_TAX)
|
||||
pricing_period = models.CharField(_("pricing period"), max_length=16,
|
||||
help_text=_("Period used for calculating the metric used on the "
|
||||
"pricing rate"),
|
||||
help_text=_("Time period that is used for computing the rate metric."),
|
||||
choices=(
|
||||
(BILLING_PERIOD, _("Same as billing period")),
|
||||
(MONTHLY, _("Monthly data")),
|
||||
|
@ -167,14 +169,14 @@ class Service(models.Model):
|
|||
),
|
||||
default=BILLING_PERIOD)
|
||||
rate_algorithm = models.CharField(_("rate algorithm"), max_length=16,
|
||||
help_text=_("Algorithm used to interprete the rating table"),
|
||||
help_text=_("Algorithm used to interprete the rating table."),
|
||||
choices=(
|
||||
(STEP_PRICE, _("Step price")),
|
||||
(MATCH_PRICE, _("Match price")),
|
||||
),
|
||||
default=STEP_PRICE)
|
||||
on_cancel = models.CharField(_("on cancel"), max_length=16,
|
||||
help_text=_("Defines the cancellation behaviour of this service"),
|
||||
help_text=_("Defines the cancellation behaviour of this service."),
|
||||
choices=(
|
||||
(NOTHING, _("Nothing")),
|
||||
(DISCOUNT, _("Discount")),
|
||||
|
@ -184,7 +186,7 @@ class Service(models.Model):
|
|||
default=DISCOUNT)
|
||||
payment_style = models.CharField(_("payment style"), max_length=16,
|
||||
help_text=_("Designates whether this service should be paid after "
|
||||
"consumtion (postpay/on demand) or prepaid"),
|
||||
"consumtion (postpay/on demand) or prepaid."),
|
||||
choices=(
|
||||
(PREPAY, _("Prepay")),
|
||||
(POSTPAY, _("Postpay (on demand)")),
|
||||
|
|
|
@ -4,14 +4,13 @@ from django.utils.translation import ugettext_lazy as _
|
|||
|
||||
SERVICES_SERVICE_TAXES = getattr(settings, 'SERVICES_SERVICE_TAXES', (
|
||||
(0, _("Duty free")),
|
||||
(7, _("7%")),
|
||||
(21, _("21%")),
|
||||
(21, "21%"),
|
||||
))
|
||||
|
||||
SERVICES_SERVICE_DEFAUL_TAX = getattr(settings, 'ORDERS_SERVICE_DFAULT_TAX', 0)
|
||||
|
||||
|
||||
SERVICES_SERVICE_ANUAL_BILLING_MONTH = getattr(settings, 'SERVICES_SERVICE_ANUAL_BILLING_MONTH', 4)
|
||||
SERVICES_SERVICE_ANUAL_BILLING_MONTH = getattr(settings, 'SERVICES_SERVICE_ANUAL_BILLING_MONTH', 1)
|
||||
|
||||
|
||||
SERVICES_ORDER_MODEL = getattr(settings, 'SERVICES_ORDER_MODEL', 'orders.Order')
|
||||
|
|
|
@ -196,6 +196,7 @@ WEBAPPS_PHP_DISABLED_FUNCTIONS = getattr(settings, 'WEBAPPS_PHP_DISABLED_FUNCTIO
|
|||
])
|
||||
|
||||
|
||||
# TODO
|
||||
WEBAPPS_WORDPRESSMU_BASE_URL = getattr(settings, 'WEBAPPS_WORDPRESSMU_BASE_URL',
|
||||
'http://blogs.example.com')
|
||||
|
||||
|
|
Loading…
Reference in a new issue