From 781a873f61c88288955924c3a4464747078b978d Mon Sep 17 00:00:00 2001 From: Marc Date: Mon, 20 Oct 2014 10:20:18 +0000 Subject: [PATCH] Fixed SRV subdomains --- TODO.md | 2 +- orchestra/apps/domains/models.py | 6 +++--- orchestra/management/commands/setupcelery.py | 2 +- orchestra/templates/admin/base.html | 11 +++++------ scripts/migration/domains.sh | 1 + 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/TODO.md b/TODO.md index e8d48968..9ef5e175 100644 --- a/TODO.md +++ b/TODO.md @@ -147,7 +147,7 @@ Remember that, as always with QuerySets, any subsequent chained methods which im textwrap.dedent( \\) * accounts - * short name / long name + * short name / long name, account name really needed? address? only minimal info.. * contact inlines * autocreate stuff (email/.orchestra.lan/plans) * account username should be domain freiendly withot lines diff --git a/orchestra/apps/domains/models.py b/orchestra/apps/domains/models.py index 71dce022..4e1cebca 100644 --- a/orchestra/apps/domains/models.py +++ b/orchestra/apps/domains/models.py @@ -98,11 +98,11 @@ class Domain(models.Model): settings.DOMAINS_DEFAULT_MIN_CACHING_TIME ] records.insert(0, AttrDict(type=Record.SOA, value=' '.join(soa))) - no_cname = Record.CNAME not in types - if Record.MX not in types and no_cname: + is_a = not types or Record.A in types or Record.AAAA in types + if Record.MX not in types and is_a: for mx in settings.DOMAINS_DEFAULT_MX: records.append(AttrDict(type=Record.MX, value=mx)) - if (Record.A not in types and Record.AAAA not in types) and no_cname: + if (Record.A not in types and Record.AAAA not in types) and is_a: records.append(AttrDict(type=Record.A, value=settings.DOMAINS_DEFAULT_A)) result = '' for record in records: diff --git a/orchestra/management/commands/setupcelery.py b/orchestra/management/commands/setupcelery.py index a6bf9c3f..d987a9b1 100644 --- a/orchestra/management/commands/setupcelery.py +++ b/orchestra/management/commands/setupcelery.py @@ -13,7 +13,7 @@ class Command(BaseCommand): self.option_list = BaseCommand.option_list + ( make_option('--username', dest='username', default='orchestra', help='Specifies the system user that would run celeryd.'), - make_option('--processes', dest='processes', default=5, + make_option('--processes', dest='processes', default=2, help='Number of celeryd processes.'), make_option('--noinput', action='store_false', dest='interactive', default=True, help='Tells Django to NOT prompt the user for input of any kind. ' diff --git a/orchestra/templates/admin/base.html b/orchestra/templates/admin/base.html index dcdf02f5..f995bd69 100644 --- a/orchestra/templates/admin/base.html +++ b/orchestra/templates/admin/base.html @@ -34,7 +34,6 @@ {% block container-stetic %}
{% endblock %} - {% if not is_popup %} {% block header-stetic %} -
{% block breadcrumbs %}{% endblock %}
+
{% block breadcrumbs %}{% endblock %}
{% endif %} - + {% block messages %} {% if messages %}
    {% for message in messages %} -
    +
    {{ message }}
    {% endfor %}
{% endif %} {% endblock messages %} - +
{% block pretitle %}{% endblock %} @@ -68,7 +67,7 @@
- + {% block footer %}{% endblock %}
diff --git a/scripts/migration/domains.sh b/scripts/migration/domains.sh index 959d96f5..a3555209 100644 --- a/scripts/migration/domains.sh +++ b/scripts/migration/domains.sh @@ -19,6 +19,7 @@ echo "account = Account.objects.get(pk=1)" ERRORS="" while read name; do [[ -f $name ]] && { + [[ ! $(echo "$name" | grep '/' > /dev/null ) ]] && name="./${name}" ZONE_PATH=${name%/*} name=${name##*/} }