#NEWLINE# def get_workflow_version_slugs( ) : #NEWLINE# #INDENT# versions = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# for app_name in settings . ORCHESTRA_WORKFLOWS : #NEWLINE# #INDENT# app_label = app_name . split ( '.' ) [ ( - 1 ) ] #NEWLINE# workflow_directory = django_apps . get_app_config ( app_label ) . path #NEWLINE# data = parse_workflow_directory ( workflow_directory ) #NEWLINE# workflow_slug = data [ 'workflow' ] [ 'slug' ] #NEWLINE# if ( versions . get ( app_name ) is not None ) : #NEWLINE# #INDENT# raise WorkflowError ( 'Workflow {} present in multiple apps: {}, {}' . format ( workflow_slug , versions [ workflow_slug ] [ 'app_label' ] , app_label ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# versions [ workflow_slug ] = { #NEWLINE# #INDENT# 'app_label' : app_label , #NEWLINE# 'versions' : ( version [ 'slug' ] for version in data [ 'versions' ] ) , #NEWLINE# #UNINDENT# } #NEWLINE# #UNINDENT# #UNINDENT# return versions