コード例 #1
0
 def _generate_image_name(project, user, operation, image_name):
     if not image_name:
         if operation is not None:
             # create a name based on the operation that created the image
             # e.g. TVB-Algo-Name-354
             image_name = operation.algorithm.name.replace(' ', '-')
         else:
             # default to a generic name
             image_name = "figure"
     figure_count = dao.get_figure_count(project.id, user.id) + 1
     return 'TVB-%s-%s' % (image_name, figure_count)
コード例 #2
0
ファイル: figure_service.py プロジェクト: vnyk/tvb-framework
 def _generate_image_name(project, user, operation, image_name):
     if not image_name:
         if operation is not None:
             # create a name based on the operation that created the image
             # e.g. TVB-Algo-Name-354
             image_name = operation.algorithm.displayname.replace(' ', '-')
         else:
             # default to a generic name
             image_name = "figure"
     figure_count = dao.get_figure_count(project.id, user.id) + 1
     return 'TVB-%s-%s' % (image_name, figure_count)
コード例 #3
0
 def _generate_image_name(project, user, image_name):
     if not image_name:
         # default to a generic name prefix
         image_name = "figure"
     figure_count = dao.get_figure_count(project.id, user.id) + 1
     return 'TVB-%s-%s' % (image_name, figure_count)