本文整理汇总了Python中pyasm.search.SearchType.get_project方法的典型用法代码示例。如果您正苦于以下问题:Python SearchType.get_project方法的具体用法?Python SearchType.get_project怎么用?Python SearchType.get_project使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pyasm.search.SearchType
的用法示例。
在下文中一共展示了SearchType.get_project方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: get_display
# 需要导入模块: from pyasm.search import SearchType [as 别名]
# 或者: from pyasm.search.SearchType import get_project [as 别名]
def get_display(self):
project = SearchType.get_project()
self.set_option("labels", "%s|general" % (project))
self.set_option("values", "%s|gen" % (project))
return super(AssetLibraryTypeWdg,self).get_display()
示例2: get_latest
# 需要导入模块: from pyasm.search import SearchType [as 别名]
# 或者: from pyasm.search.SearchType import get_project [as 别名]
def get_latest(search_type, category=None, project=None):
search = Search(Template.SEARCH_TYPE)
search.add_filter("search_type", search_type)
if category:
search.add_filter("category", category)
if not project:
project = SearchType.get_project()
search.add_filter("project_code", project)
search.add_order_by("code desc")
return search.get_sobject()
示例3: execute
# 需要导入模块: from pyasm.search import SearchType [as 别名]
# 或者: from pyasm.search.SearchType import get_project [as 别名]
def execute(my):
from pyasm.flash.widget import FlashLayerCheckboxWdg
web = WebContainer.get_web()
cam_search_key = web.get_form_value(FlashRenderTableElementWdg.RENDER_CAM)
context_name = web.get_form_value(FlashRenderTableElementWdg.CONTEXT_NAME)
sobject = Search.get_by_search_key(my.search_keys[0])
render = FlashLayerRenderCmd()
render.set_search_keys(my.search_keys)
render.set_cam_search_key(cam_search_key)
render.set_context_name(context_name)
render.set_project(SearchType.get_project())
# render.execute()
dispatch = TacticDispatcher()
dispatch.set_description("Flash Render: %s" % sobject.get_code())
dispatch.execute_slave(render)
my.description = "Submitted: %s" % ", ".join(my.search_keys)