当前位置: 首页>>代码示例>>Python>>正文


Python ProdSetting.get_by_key方法代码示例

本文整理汇总了Python中pyasm.prod.biz.ProdSetting.get_by_key方法的典型用法代码示例。如果您正苦于以下问题:Python ProdSetting.get_by_key方法的具体用法?Python ProdSetting.get_by_key怎么用?Python ProdSetting.get_by_key使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在pyasm.prod.biz.ProdSetting的用法示例。


在下文中一共展示了ProdSetting.get_by_key方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: __init__

# 需要导入模块: from pyasm.prod.biz import ProdSetting [as 别名]
# 或者: from pyasm.prod.biz.ProdSetting import get_by_key [as 别名]
    def __init__(my, **kwargs):
        my.frames = kwargs.get("frames")
        my.fps = kwargs.get("fps")
        if not my.fps:
            from pyasm.prod.biz import ProdSetting
            my.fps = ProdSetting.get_by_key("fps")
        if not my.fps:
            my.fps = 24

        if not my.frames:
            timecode = kwargs.get("timecode")
            my.frames = my.calculate_frames(timecode, my.fps)
开发者ID:blezek,项目名称:TACTIC,代码行数:14,代码来源:timecode.py

示例2: get_display

# 需要导入模块: from pyasm.prod.biz import ProdSetting [as 别名]
# 或者: from pyasm.prod.biz.ProdSetting import get_by_key [as 别名]
    def get_display(self):
        
        task_div = DivWdg(self.label)
        task_div.add_style("text-align: left")
        task_div.add_style('margin-left','10px')
        setting = ProdSetting.get_by_key(self.shot_status_setting)
        if not setting:
            BaseAppServer.add_onload_script(IframeWdg.get_popup_script(\
                "The Project Setting [%s] is required to be set."%self.shot_status_setting))
            return

        # add a check-all toggle control
        checkbox_control = CheckboxWdg("sobj_status_control")
        checkbox_control.add_event("onclick", "get_elements('sobj_status').toggle_all(this);")
        task_div.add(checkbox_control)
        
        

        checked_all_status = True
        for status in self.statuses:
            span = SpanWdg(css="med")
            checkbox = CheckboxWdg("sobj_status")
            checkbox.set_persistence()
            
            checkbox.set_option("value", status)

            if checked_all_status and not checkbox.is_checked():
                checked_all_status = False
            
            span.add(checkbox)
            span.add(status)
            task_div.add(span)
        
        if checked_all_status:
            checkbox_control.set_checked()
        return task_div
开发者ID:mincau,项目名称:TACTIC,代码行数:38,代码来源:task_manager_wdg.py

示例3: get_notes_wdg

# 需要导入模块: from pyasm.prod.biz import ProdSetting [as 别名]
# 或者: from pyasm.prod.biz.ProdSetting import get_by_key [as 别名]
    def get_notes_wdg(self):
        widget = Widget()
        help = HelpItemWdg('Notes tab', 'The Notes tab focuses on the display of notes. It includes both shot notes and submission notes for each shot.')
        widget.add(help)
        div = DivWdg(css="filter_box")
        text = TextWdg("shot_search")
        text.set_persist_on_submit()
        div.add("Shot Search: ")
        div.add(text)

        sequence_filter = SequenceFilterWdg()
        
        div.add(sequence_filter)

        # add Note Context dropdown
        # scope with config base, also used in DiscussionWdg and SObjectTaskTableElement
        config_base = 'prod_notes' 
        context_select = ProcessFilterSelectWdg(name="%s_discussion_context" %config_base,\
                has_empty=False, search_type='prod/shot', label='Note Context: ' )

        context_select.add_empty_option("-- Any Context --")
        context_select._add_options()
        setting = "notes_prod_context"
        values_option = ProdSetting.get_seq_by_key(setting) 
        if not values_option:
            data_dict = {'key': setting}
            prod_setting = ProdSetting.get_by_key(setting)
            ps_id = -1
            if prod_setting:
                ps_id = prod_setting.get_id()
            context_select._set_append_widget(ps_id, data_dict)
        labels, values = context_select.get_select_values()
        if values_option:
            context_select.append_option('','')
            context_select.append_option('<< %s >>' %setting, ','.join(values_option))
        for value in values_option:
            if value not in values:
                context_select.append_option(value, value)

        context_select.set_dom_options()

        div.add(context_select)
        hint = HintWdg('Submission notes for each shot are also included here')
        div.add(hint)

        div.add(IconRefreshWdg(long=False))
        search_limit = SearchLimitWdg()
        div.add(search_limit)

        widget.add(div)


        # create a search
        search = Search("prod/shot")
        text_value = text.get_value()
        sequence_filter.alter_search(search)  

        if text_value:
            filter = Search.get_compound_filter(text_value, ['code', 'description'])
            search.add_where(filter)
        search_limit.alter_search(search)
        sobjects = search.get_sobjects()


        table = TableWdg("prod/shot", config_base)
        table.set_class("table")
        table.set_sobjects(sobjects)
        widget.add(table)
        return widget
开发者ID:mincau,项目名称:TACTIC,代码行数:71,代码来源:shot_tab_wdg.py


注:本文中的pyasm.prod.biz.ProdSetting.get_by_key方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。