本文整理汇总了Python中werkzeug.datastructures.CombinedMultiDict.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python CombinedMultiDict.__init__方法的具体用法?Python CombinedMultiDict.__init__怎么用?Python CombinedMultiDict.__init__使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类werkzeug.datastructures.CombinedMultiDict
的用法示例。
在下文中一共展示了CombinedMultiDict.__init__方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: reload
# 需要导入模块: from werkzeug.datastructures import CombinedMultiDict [as 别名]
# 或者: from werkzeug.datastructures.CombinedMultiDict import __init__ [as 别名]
def reload(self):
"""Reload user login information and saves them."""
data = self._login(self.uid, force=True)
acc = self._precache(data, force=True)
self.info.update(data)
CombinedMultiDict.__init__(self, [self.req, self.info, acc, dict(CFG_USER_DEFAULT_INFO)])
self.save()
示例2: __init__
# 需要导入模块: from werkzeug.datastructures import CombinedMultiDict [as 别名]
# 或者: from werkzeug.datastructures.CombinedMultiDict import __init__ [as 别名]
def __init__(self, uid=None, force=False):
"""Retrieve information about user."""
def on_update(self):
"""Change own status when the user info is modified."""
self.modified = True
self.modified = False
self.uid = uid
self.req = self._get_request_info()
acc = {}
if uid is not None and uid > 0:
data = self._login(uid, force)
acc = self._precache(data, force)
else:
data = self._create_guest()
self.info = CallbackDict(data, on_update)
# FIXME remove req after everybody start using flask request.
CombinedMultiDict.__init__(self, [self.req, self.info, acc,
dict(CFG_USER_DEFAULT_INFO)])
self.save()