Example #1
0
 def handle(self, request, data):
     super(SaveTemplateAsForm, self).handle(request, data)
     project_api.transfer_files(self.template_name, data.get('template_name'))
     project_api.remove_useless_files(self.template_name, self.data['canvas_data'])
     return True
Example #2
0
 def handle(self, request, data):
     project_api.save_template(self.template_name, self.data['canvas_data'])
     project_api.save_user_file(self.template_name, request.FILES)
     project_api.remove_useless_files(self.template_name, self.data['canvas_data'])
     return True