本文整理汇总了Python中pyasm.common.Common.get_display_name方法的典型用法代码示例。如果您正苦于以下问题:Python Common.get_display_name方法的具体用法?Python Common.get_display_name怎么用?Python Common.get_display_name使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pyasm.common.Common
的用法示例。
在下文中一共展示了Common.get_display_name方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: create_search_types
# 需要导入模块: from pyasm.common import Common [as 别名]
# 或者: from pyasm.common.Common import get_display_name [as 别名]
def create_search_types(my):
from tactic.ui.app import SearchTypeCreatorCmd
project_code = my.kwargs.get('project_code')
search_types = my.kwargs.get('project_stype')
if not search_types:
return
for search_type in search_types:
if search_type == "":
continue
search_type = Common.get_filesystem_name(search_type)
if search_type.find("/") != -1:
parts = search_type.split("/")
namespace = parts[0]
table = parts[1]
else:
namespace = project_code
table = search_type
search_type = "%s/%s" % (namespace, search_type)
description = Common.get_display_name(table)
title = description
has_pipeline = True
kwargs = {
'database': project_code,
'namespace': project_code,
'schema': 'public',
'search_type_name': search_type,
'asset_description': description,
'asset_title': title,
'sobject_pipeline': has_pipeline,
}
creator = SearchTypeCreatorCmd(**kwargs)
creator.execute()