Removed nameserver viewing constraints, cleanup
This commit is contained in:
parent
7825b530e3
commit
68e5c31426
|
@ -77,21 +77,12 @@ class NameserverCreate(LoginRequiredMixin, CreateView):
|
|||
|
||||
class NameserverDetail(LoginRequiredMixin, DetailView):
|
||||
model = Nameserver
|
||||
#slug_field = "name"
|
||||
#slug_url_kwarg = "domain"
|
||||
#context_object_name = "nameserver"
|
||||
template_name = "whoisdb/handle_show.html"
|
||||
|
||||
def get_queryset(self):
|
||||
mnts = self.request.user.maintainer_set.all()
|
||||
return self.model.objects.filter(mnt_by__in=mnts).distinct()
|
||||
|
||||
|
||||
class NameserverEdit(MntGenericMixin, LoginRequiredMixin, UpdateView):
|
||||
model = Nameserver
|
||||
form_class = NameserverForm
|
||||
#slug_field = "name"
|
||||
#slug_url_kwarg = "domain"
|
||||
template_name = "domains/obj_edit.html"
|
||||
|
||||
def get_form_kwargs(self, *args, **kwargs):
|
||||
|
@ -103,8 +94,6 @@ class NameserverEdit(MntGenericMixin, LoginRequiredMixin, UpdateView):
|
|||
class NameserverDelete(MntGenericMixin, LoginRequiredMixin, DeleteCheckView):
|
||||
template_name = "domains/obj_delete.html"
|
||||
model = Nameserver
|
||||
#slug_field = "name"
|
||||
#slug_url_kwarg = "domain"
|
||||
success_url = reverse_lazy("domains:overview")
|
||||
|
||||
|
||||
|
@ -121,17 +110,12 @@ class ReverseZoneCreate(LoginRequiredMixin, CreateView):
|
|||
|
||||
class ReverseZoneDetail(LoginRequiredMixin, DetailView):
|
||||
model = ReverseZone
|
||||
#slug_field = "name"
|
||||
#slug_url_kwarg = "domain"
|
||||
#context_object_name = "nameserver"
|
||||
template_name = "whoisdb/handle_show.html"
|
||||
|
||||
|
||||
class ReverseZoneEdit(MntGenericMixin, LoginRequiredMixin, UpdateView):
|
||||
model = ReverseZone
|
||||
form_class = ReverseZoneForm
|
||||
#slug_field = "name"
|
||||
#slug_url_kwarg = "domain"
|
||||
template_name = "domains/obj_edit.html"
|
||||
|
||||
def get_form_kwargs(self, *args, **kwargs):
|
||||
|
@ -153,8 +137,6 @@ class ReverseZoneDelete(LoginRequiredMixin, DeleteCheckView):
|
|||
template_name = "domains/obj_delete.html"
|
||||
model = ReverseZone
|
||||
success_url = reverse_lazy("domains:overview")
|
||||
#slug_field = "name"
|
||||
#slug_url_kwarg = "domain"
|
||||
|
||||
def get_queryset(self):
|
||||
mnts = self.request.user.maintainer_set.all()
|
||||
|
|
Loading…
Reference in New Issue