device models

This commit is contained in:
RobbieHan
2019-01-03 20:54:17 +08:00
parent 4fbdc88743
commit 9d0bd95b69
2 changed files with 100 additions and 4 deletions

View File

@@ -15,8 +15,8 @@ class CodeView(LoginRequiredMixin, BreadcrumbMixin, TemplateView):
template_name = 'cmdb/code.html'
def get_context_data(self):
context = dict(code_parent=Code.objects.filter(parent=None))
return context
self.kwargs['code_parent'] = Code.objects.filter(parent=None)
return super().get_context_data(**self.kwargs)
class CodeCreateView(SandboxCreateView):