Exemplo n.º 1
0
 def get(self, request: http.HttpRequest, *args,
         **kwargs) -> http.HttpResponse:
     """Process the get request."""
     return services.save_action_form(
         request,
         self.form_class(instance=self.get_object(),
                         workflow=kwargs['workflow']), self.template_name)
Exemplo n.º 2
0
 def post(self, request: http.HttpRequest, **kwargs) -> http.HttpResponse:
     """Process the post request when creating an action."""
     return services.save_action_form(
         request,
         self.form_class(request.POST, workflow=kwargs.get('workflow')),
         self.template_name,
         workflow=kwargs.get('workflow'),
     )