本文整理汇总了Python中pyasm.web.DivWdg.get_style方法的典型用法代码示例。如果您正苦于以下问题:Python DivWdg.get_style方法的具体用法?Python DivWdg.get_style怎么用?Python DivWdg.get_style使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pyasm.web.DivWdg
的用法示例。
在下文中一共展示了DivWdg.get_style方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: BaseRefreshWdg
# 需要导入模块: from pyasm.web import DivWdg [as 别名]
# 或者: from pyasm.web.DivWdg import get_style [as 别名]
class BaseRefreshWdg(Widget):
def __init__(self, **kwargs):
# get the them from cgi
self.handle_args(kwargs)
self.top = DivWdg()
super(BaseRefreshWdg,self).__init__()
#
# Define a standard format for widgets
#
# Get it from web_form_values()
ARGS_KEYS = {}
def get_args_keys(cls):
'''external settings which populate the widget'''
return cls.ARGS_KEYS
get_args_keys = classmethod(get_args_keys)
CATEGORY_KEYS = {}
def get_category_keys(cls):
return cls.CATEGORY_KEYS
get_category_keys = classmethod(get_category_keys)
# DEPRECATED: use ARGS_KEYS
ARGS_OPTIONS = []
def get_args_options(cls):
'''external settings which populate the widget'''
return cls.ARGS_OPTIONS
get_args_options = classmethod(get_args_options)
def handle_args(self, kwargs):
# verify the args
#args_keys = self.get_args_keys()
if kwargs.get("include_form_values") in [True, 'true']:
web = WebContainer.get_web()
args_keys = self.get_args_keys()
for key in args_keys.keys():
if web and not kwargs.has_key(key):
value = web.get_form_value(key)
kwargs[key] = value
else:
args_keys = self.get_args_keys()
for key in args_keys.keys():
if not kwargs.has_key(key):
kwargs[key] = ''
self.kwargs = kwargs
def set_arg(self, name, value):
self.kwargs[name] = value
def get_top(self):
return self.top
def add_class(self, class_name):
self.top.add_class(class_name)
def add_attr(self, name, value):
self.top.add_attr(name, value)
def set_attr(self, name, value):
self.top.set_attr(name, value)
def add_style(self, name, value=None):
self.top.add_style(name, value)
def get_style(self, name):
self.top.get_style(name)
def add_behavior(self, behavior):
self.top.add_behavior(behavior)
def add_color(self, name, palette_key, modifier=0, default=None):
self.top.add_color(name, palette_key, modifier=modifier, default=default)
def get_kwargs(self):
return self.kwargs
def get_sobject_from_kwargs(self):
sobject = None
search_key = self.kwargs.get('search_key')
parent_key = self.kwargs.get('parent_key')
# sometimes None is passed as a string
#.........这里部分代码省略.........