Commit 31f77d82 by Kálmán Viktor

dashboard: irrelevant fixes

parent ad1519f3
...@@ -1482,14 +1482,6 @@ class NodeCreate(LoginRequiredMixin, SuperuserRequiredMixin, TemplateView): ...@@ -1482,14 +1482,6 @@ class NodeCreate(LoginRequiredMixin, SuperuserRequiredMixin, TemplateView):
}) })
return self.render_to_response(context) return self.render_to_response(context)
def get_context_data(self, **kwargs):
context = super(NodeCreate, self).get_context_data(**kwargs)
# TODO acl
context.update({
})
return context
# TODO handle not ajax posts # TODO handle not ajax posts
def post(self, request, *args, **kwargs): def post(self, request, *args, **kwargs):
if not self.request.user.is_authenticated(): if not self.request.user.is_authenticated():
...@@ -1580,8 +1572,7 @@ class VmDelete(LoginRequiredMixin, DeleteView): ...@@ -1580,8 +1572,7 @@ class VmDelete(LoginRequiredMixin, DeleteView):
object = self.get_object() object = self.get_object()
if not object.has_level(self.request.user, 'owner'): if not object.has_level(self.request.user, 'owner'):
raise PermissionDenied() raise PermissionDenied()
# this is redundant now, but if we wanna add more to print
# we'll need this
context = super(VmDelete, self).get_context_data(**kwargs) context = super(VmDelete, self).get_context_data(**kwargs)
return context return context
...@@ -1620,12 +1611,6 @@ class NodeDelete(LoginRequiredMixin, SuperuserRequiredMixin, DeleteView): ...@@ -1620,12 +1611,6 @@ class NodeDelete(LoginRequiredMixin, SuperuserRequiredMixin, DeleteView):
else: else:
return ['dashboard/confirm/base-delete.html'] return ['dashboard/confirm/base-delete.html']
def get_context_data(self, **kwargs):
# this is redundant now, but if we wanna add more to print
# we'll need this
context = super(NodeDelete, self).get_context_data(**kwargs)
return context
# github.com/django/django/blob/master/django/views/generic/edit.py#L245 # github.com/django/django/blob/master/django/views/generic/edit.py#L245
def delete(self, request, *args, **kwargs): def delete(self, request, *args, **kwargs):
object = self.get_object() object = self.get_object()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment