Fixes on domain backend

This commit is contained in:
Marc 2014-10-17 13:14:31 +00:00
parent b6a168390f
commit 69d6e41254
3 changed files with 4 additions and 4 deletions

View file

@ -39,7 +39,7 @@ class DomainInline(admin.TabularInline):
extra = 0 extra = 0
verbose_name_plural = _("Subdomains") verbose_name_plural = _("Subdomains")
domain_link = admin_link() domain_link = admin_link('__unicode__')
domain_link.short_description = _("Name") domain_link.short_description = _("Name")
def has_add_permission(self, *args, **kwargs): def has_add_permission(self, *args, **kwargs):

View file

@ -49,8 +49,8 @@ class Bind9MasterDomainBackend(ServiceController):
# These can never be top level domains # These can never be top level domains
return return
self.append(textwrap.dedent(""" self.append(textwrap.dedent("""
cat -s <(sed -e 's/^};/};\n/' named.conf.local) | \ cat -s <(sed -e 's/^};/};\n/' named.conf.local) | \\
awk -v s="%(name)s" 'BEGIN { RS=""; s="zone \""s"\"" } $0!~s{ print $0"\n" }' \ awk -v s="%(name)s" 'BEGIN { RS=""; s="zone \""s"\"" } $0!~s{ print $0"\n" }' \\
> %(conf_path)s.tmp""" % context > %(conf_path)s.tmp""" % context
)) ))
self.append('diff -I"^\s*//" %(conf_path)s.tmp %(conf_path)s || UPDATED=1' % context) self.append('diff -I"^\s*//" %(conf_path)s.tmp %(conf_path)s || UPDATED=1' % context)

View file

@ -44,7 +44,7 @@ def message_user(request, logs):
errors = total-successes errors = total-successes
if total > 1: if total > 1:
url = reverse('admin:orchestration_backendlog_changelist') url = reverse('admin:orchestration_backendlog_changelist')
url += '?id__in=%s' ','.join(map(str, ids)) url += '?id__in=%s' % ','.join(map(str, ids))
else: else:
url = reverse('admin:orchestration_backendlog_change', args=ids) url = reverse('admin:orchestration_backendlog_change', args=ids)
if errors: if errors: