From 246032f03ea47739c22c5c9b1b7f9baddff82663 Mon Sep 17 00:00:00 2001 From: Sebastian Lohff Date: Mon, 27 Mar 2017 02:15:26 +0200 Subject: [PATCH] Only show warning if no mnt present on domains --- domains/views.py | 2 +- templates/domains/overview.html | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/domains/views.py b/domains/views.py index 8902eac..6a1d4b9 100644 --- a/domains/views.py +++ b/domains/views.py @@ -20,7 +20,7 @@ def overview(request): nameservers = Nameserver.objects.filter(mnt_by__in=mnts).distinct() reversezones = ReverseZone.objects.filter(Q(parentNet__mnt_by__in=mnts) | Q(parentNet__mnt_lower__in=mnts)).distinct() - return render(request, "domains/overview.html", {"domains": domains, "nameservers": nameservers, 'reversezones': reversezones}) + return render(request, "domains/overview.html", {"mnts": mnts, "domains": domains, "nameservers": nameservers, 'reversezones': reversezones}) class DomainCreate(LoginRequiredMixin, CreateView): diff --git a/templates/domains/overview.html b/templates/domains/overview.html index 8420495..d7a7623 100644 --- a/templates/domains/overview.html +++ b/templates/domains/overview.html @@ -9,10 +9,12 @@
DNS Overview
+ {% if not mnts %} + {% endif %}

Your Nameservers (New nameserver)