• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Python routing.BaseConverter类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Python中werkzeug.routing.BaseConverter的典型用法代码示例。如果您正苦于以下问题:Python BaseConverter类的具体用法?Python BaseConverter怎么用?Python BaseConverter使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



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

示例1: __init__

 def __init__(self, url_map):
     BaseConverter.__init__(self, url_map)
     self.regex = r'(?i)(?:WQL)'
开发者ID:pywbem,项目名称:yawn,代码行数:3,代码来源:url_convert.py


示例2: __init__

 def __init__(self, map):
     BaseConverter.__init__(self, map)
     self.regex = '(?:%s)' % '|'.join([re.escape(x) for x in NEWS_URLS])
开发者ID:ThiefMaster,项目名称:hskatom,代码行数:3,代码来源:__init__.py


示例3: to_url

 def to_url(self, value):
     """Convert datetime to string."""
     return BaseConverter.to_url(self, str(value))
开发者ID:inspirehep,项目名称:invenio-trends,代码行数:3,代码来源:utils.py


示例4: __init__

 def __init__(self, url_map):
     BaseConverter.__init__(self, url_map)
     self.regex = '(?:%s)' % '|'.join([re.escape(x) for x in items])
开发者ID:SCOAP3,项目名称:invenio,代码行数:3,代码来源:url_converters.py


示例5: __init__

 def __init__(self, map):
     BaseConverter.__init__(self, map)
     self.regex = '\w+(?:-\w+)*'
开发者ID:pferreir,项目名称:indico-backup,代码行数:3,代码来源:util.py


示例6: __init__

 def __init__(self, map):
     BaseConverter.__init__(self, map)
     self.fixed_digits = 64
开发者ID:jjjan,项目名称:MEMT,代码行数:3,代码来源:utils.py


示例7: __init__

    def __init__(self, url_map, ext):
        BaseConverter.__init__(self, url_map)

        self.regex = '[^/].*?(?:{})'.format(ext)
开发者ID:tjbearse,项目名称:kwiki,代码行数:4,代码来源:urlconverters.py


示例8: to_url

 def to_url(self, values):
     return ",".join([BaseConverter.to_url(value) for value in values])
开发者ID:RDCEP,项目名称:EDE,代码行数:2,代码来源:utils.py


示例9: to_url

 def to_url(self, values):
     if len(values) > 2:  # Strip out everything extra
         values = values[:2]
     return ':'.join(BaseConverter.to_url(value)
                     for value in values)
开发者ID:asielen,项目名称:Woodles_Flask,代码行数:5,代码来源:utils.py


示例10: to_url

 def to_url(self, values):
     """Return string."""
     return '+'.join(BaseConverter.to_url(value)
                     for value in values)
开发者ID:krzysztof,项目名称:invenio-base,代码行数:4,代码来源:test_app.py


示例11: __init__

 def __init__(self, map, *args):
     BaseConverter.__init__(self,map)
     self.map = map
     self.regex = args[0]
开发者ID:siliu3,项目名称:c-SewpPocket,代码行数:4,代码来源:converter.py


示例12: to_url

 def to_url(self, values):
     return "[{0}]".format(
         ','.join(BaseConverter.to_url(value) for value in values) #pylint: disable=no-value-for-parameter
     ) 
开发者ID:OaklandPeters,项目名称:dist-map-reduce,代码行数:4,代码来源:webindex.py


示例13: __init__

 def __init__(self, mapping, *items):
     BaseConverter.__init__(self, mapping)
     # Start by enforcing that x is an integer then convert it to string
     self.regex = '(?:%s)' % '|'.join([str(int(x)) for x in items])
开发者ID:crim-ca,项目名称:RESTPackage,代码行数:4,代码来源:utility_rest.py


示例14: to_url

 def to_url(self, values):
     """
     被url_for()调用,来转换参数成为符合URL的形式
     """
     return '+'.join(BaseConverter.to_url(value)
                     for value in values)
开发者ID:okosioc,项目名称:flask-boot,代码行数:6,代码来源:converters.py


示例15: to_url

 def to_url(self, value):
     return BaseConverter.to_url(value)
开发者ID:rhino1998,项目名称:Voting-System,代码行数:2,代码来源:util.py


示例16: to_url

 def to_url(self, value):
     self.set_item(value)
     return BaseConverter.to_url(self, value.name)
开发者ID:Drew-Kimberly,项目名称:fullstack,代码行数:3,代码来源:util.py


示例17: to_url

 def to_url(self, values):
     print(1111111111, values)
     return self.separator.join(BaseConverter.to_url(value)
                                for value in values)
开发者ID:cyan-blue,项目名称:python_code,代码行数:4,代码来源:flask_test.py


示例18: __init__

 def __init__(self, map, *items):
     BaseConverter.__init__(self, map)
     self.regex = items[0]
开发者ID:cconger,项目名称:BuildCraft,代码行数:3,代码来源:__init__.py


示例19: __init__

 def __init__(self, map, *items):
     BaseConverter.__init__(self, map)
     self.items = items
开发者ID:lucilio,项目名称:motyro,代码行数:3,代码来源:__init__.py


示例20: to_url

 def to_url(self, values):
     return ','.join(BaseConverter.to_url(value) for value in values)
开发者ID:nickaversano,项目名称:msg,代码行数:2,代码来源:__init__.py



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Python routing.Map类代码示例发布时间:2022-05-26
下一篇:
Python posixemulation.rename函数代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap