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


Python Map.bind方法代码示例

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


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

示例1: refresh

# 需要导入模块: from werkzeug.routing import Map [as 别名]
# 或者: from werkzeug.routing.Map import bind [as 别名]
def refresh(self):
        """Rebinds and refreshes the URL.  Call this if you modified the
        rule in place.

        :internal:
        """
        self.bind(self.map, rebind=True) 
开发者ID:Frank-qlu,项目名称:recruit,代码行数:9,代码来源:routing.py

示例2: bind

# 需要导入模块: from werkzeug.routing import Map [as 别名]
# 或者: from werkzeug.routing.Map import bind [as 别名]
def bind(self, map, rebind=False):
        """Bind the url to a map and create a regular expression based on
        the information from the rule itself and the defaults from the map.

        :internal:
        """
        if self.map is not None and not rebind:
            raise RuntimeError("url rule %r already bound to map %r" % (self, self.map))
        self.map = map
        if self.strict_slashes is None:
            self.strict_slashes = map.strict_slashes
        if self.subdomain is None:
            self.subdomain = map.default_subdomain
        self.compile() 
开发者ID:Frank-qlu,项目名称:recruit,代码行数:16,代码来源:routing.py

示例3: add

# 需要导入模块: from werkzeug.routing import Map [as 别名]
# 或者: from werkzeug.routing.Map import bind [as 别名]
def add(self, rulefactory):
        """Add a new rule or factory to the map and bind it.  Requires that the
        rule is not bound to another map.

        :param rulefactory: a :class:`Rule` or :class:`RuleFactory`
        """
        for rule in rulefactory.get_rules(self):
            rule.bind(self)
            self._rules.append(rule)
            self._rules_by_endpoint.setdefault(rule.endpoint, []).append(rule)
        self._remap = True 
开发者ID:Frank-qlu,项目名称:recruit,代码行数:13,代码来源:routing.py

示例4: bind

# 需要导入模块: from werkzeug.routing import Map [as 别名]
# 或者: from werkzeug.routing.Map import bind [as 别名]
def bind(self, map, rebind=False):
        """Bind the url to a map and create a regular expression based on
        the information from the rule itself and the defaults from the map.

        :internal:
        """
        if self.map is not None and not rebind:
            raise RuntimeError('url rule %r already bound to map %r' %
                               (self, self.map))
        self.map = map
        if self.strict_slashes is None:
            self.strict_slashes = map.strict_slashes
        if self.subdomain is None:
            self.subdomain = map.default_subdomain
        self.compile() 
开发者ID:jpush,项目名称:jbox,代码行数:17,代码来源:routing.py


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