Standardize on "object" for ObjectView template context

This commit is contained in:
Jeremy Stretch
2020-11-19 11:29:18 -05:00
parent 11fa348575
commit e2d2ff8586
40 changed files with 588 additions and 627 deletions

View File

@@ -830,14 +830,6 @@ class ServiceListView(generic.ObjectListView):
class ServiceView(generic.ObjectView):
queryset = Service.objects.prefetch_related('ipaddresses')
def get(self, request, pk):
service = get_object_or_404(self.queryset, pk=pk)
return render(request, 'ipam/service.html', {
'service': service,
})
class ServiceEditView(generic.ObjectEditView):
queryset = Service.objects.prefetch_related('ipaddresses')