From ed0e51b73f4cc7b026659c4425e59a4da5ce312d Mon Sep 17 00:00:00 2001 From: Marc Date: Tue, 21 Oct 2014 11:22:31 +0000 Subject: [PATCH] Added service metric and match descriptions and fixed domain slaves without master --- orchestra/apps/accounts/settings.py | 2 +- orchestra/apps/contacts/settings.py | 2 ++ orchestra/apps/databases/settings.py | 1 - orchestra/apps/mailboxes/settings.py | 1 + orchestra/apps/services/models.py | 22 ++++++++++++---------- orchestra/apps/services/settings.py | 5 ++--- orchestra/apps/webapps/settings.py | 1 + 7 files changed, 19 insertions(+), 15 deletions(-) diff --git a/orchestra/apps/accounts/settings.py b/orchestra/apps/accounts/settings.py index aff8f945..c4dd4730 100644 --- a/orchestra/apps/accounts/settings.py +++ b/orchestra/apps/accounts/settings.py @@ -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', diff --git a/orchestra/apps/contacts/settings.py b/orchestra/apps/contacts/settings.py index 0190d989..d84c0259 100644 --- a/orchestra/apps/contacts/settings.py +++ b/orchestra/apps/contacts/settings.py @@ -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') diff --git a/orchestra/apps/databases/settings.py b/orchestra/apps/databases/settings.py index 9fa3d7f4..4b2434b0 100644 --- a/orchestra/apps/databases/settings.py +++ b/orchestra/apps/databases/settings.py @@ -1,7 +1,6 @@ from django.conf import settings - DATABASES_TYPE_CHOICES = getattr(settings, 'DATABASES_TYPE_CHOICES', ( ('mysql', 'MySQL'), ('postgres', 'PostgreSQL'), diff --git a/orchestra/apps/mailboxes/settings.py b/orchestra/apps/mailboxes/settings.py index 97d447e4..391f7946 100644 --- a/orchestra/apps/mailboxes/settings.py +++ b/orchestra/apps/mailboxes/settings.py @@ -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') diff --git a/orchestra/apps/services/models.py b/orchestra/apps/services/models.py index 6647e439..3f11d9f7 100644 --- a/orchestra/apps/services/models.py +++ b/orchestra/apps/services/models.py @@ -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)")), diff --git a/orchestra/apps/services/settings.py b/orchestra/apps/services/settings.py index db6d5100..3605bf35 100644 --- a/orchestra/apps/services/settings.py +++ b/orchestra/apps/services/settings.py @@ -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') diff --git a/orchestra/apps/webapps/settings.py b/orchestra/apps/webapps/settings.py index 8b93a210..11c7fc8f 100644 --- a/orchestra/apps/webapps/settings.py +++ b/orchestra/apps/webapps/settings.py @@ -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')