Skip to content

Commit d047d86

Browse files
committed
Fix dostring format
1 parent a6f456d commit d047d86

File tree

1 file changed

+12
-11
lines changed

1 file changed

+12
-11
lines changed

joeflow/views.py

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -31,17 +31,18 @@ def get_template_names(self):
3131

3232
class StartWorkflowMixin:
3333
"""
34-
Use this mixin to create a start workflow with a view. Example:
35-
36-
class MyStartWorkflowView(StartWorkflowMixin, TaskViewMixin, View):
37-
def post(self, request, *args, **kwargs):
38-
try:
39-
data = json.loads(request.body)
40-
workflow_id = self.start_workflow(data)
41-
except Exception as e:
42-
return HttpResponseBadRequest("Failed to start workflow")
43-
44-
return JsonResponse({'message': 'Workflow started successfully.', 'id': workflow_id}, status=201)
34+
View-mixin to create a start workflow.
35+
36+
Example:
37+
class MyStartWorkflowView(StartWorkflowMixin, TaskViewMixin, View):
38+
def post(self, request, *args, **kwargs):
39+
try:
40+
data = json.loads(request.body)
41+
workflow_id = self.start_workflow(data)
42+
except Exception as e:
43+
return HttpResponseBadRequest("Failed to start workflow")
44+
45+
return JsonResponse({'message': 'Workflow started successfully.', 'id': workflow_id}, status=201)
4546
"""
4647

4748

0 commit comments

Comments
 (0)