Commit d89d75c8 by Kálmán Viktor Committed by Guba Sándor

dashboard: call save as async

parent 3aaf7e00
...@@ -422,12 +422,13 @@ class VmDetailView(CheckedDetailView): ...@@ -422,12 +422,13 @@ class VmDetailView(CheckedDetailView):
new_name = "Saved from %s (#%d) at %s" % ( new_name = "Saved from %s (#%d) at %s" % (,, date,, date
) )
template = self.object.save_as_template(name=new_name,
owner=request.user) # TODO csak egy maradhat!!
messages.success(request, _("Instance successfully saved as template, " self.object.save_as_template_async(name=new_name,
"please rename it!")) user=request.user,
return redirect(reverse_lazy("dashboard.views.template-detail", owner=request.user)
kwargs={'pk':})) messages.success(request, _("Saving instance as template!"))
return redirect("%s#activity" % self.object.get_absolute_url())
def __shut_down(self, request): def __shut_down(self, request):
self.object = self.get_object() self.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