本文整理汇总了Python中waterbutler.core.provider.build_url函数的典型用法代码示例。如果您正苦于以下问题:Python build_url函数的具体用法?Python build_url怎么用?Python build_url使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了build_url函数的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。
示例1: build_url
def build_url(self, *segments, _endpoint=None, **query):
"""Build the url for the specified object
:param args segments: URI segments
:param kwargs query: Query parameters
:rtype str:
"""
endpoint = _endpoint or self.endpoint
return provider.build_url(endpoint, self.container, *segments, **query)
开发者ID:Ghalko,项目名称:waterbutler,代码行数:8,代码来源:provider.py
示例2: _build_content_url
def _build_content_url(self, *segments, **query):
return provider.build_url(settings.BASE_CONTENT_URL, *segments, **query)
开发者ID:DataConservancy,项目名称:waterbutler,代码行数:2,代码来源:provider.py
示例3: _web_view
def _web_view(self, path):
segments = (self.owner, self.repo, 'blob', path.identifier[0], path.path)
return provider.build_url(settings.VIEW_URL, *segments)
开发者ID:dev-alex-alex2006hw,项目名称:waterbutler,代码行数:3,代码来源:provider.py
示例4: _build_upload_url
def _build_upload_url(self, *segments, **query):
return provider.build_url(settings.BASE_UPLOAD_URL, *segments, **query)
开发者ID:cslzchen,项目名称:waterbutler,代码行数:2,代码来源:provider.py
示例5: web_view
def web_view(self):
if self.is_public:
segments = ("articles", str(self.article_id))
else:
segments = ("account", "articles", str(self.article_id))
return build_url(settings.VIEW_URL, *segments)
开发者ID:felliott,项目名称:waterbutler,代码行数:6,代码来源:metadata.py
示例6: _web_view
def _web_view(self, path):
segments = (self.owner, self.repo, 'blob', path.branch_ref, path.path)
return provider.build_url(pd_settings.VIEW_URL, *segments)
开发者ID:CenterForOpenScience,项目名称:waterbutler,代码行数:3,代码来源:provider.py
示例7: _build_item_url
def _build_item_url(self, *segments, **query) -> str:
return provider.build_url(settings.BASE_DRIVE_URL, 'items', *segments, **query)
开发者ID:CenterForOpenScience,项目名称:waterbutler,代码行数:2,代码来源:provider.py
示例8: _build_drive_url
def _build_drive_url(self, *segments, **query) -> str:
return provider.build_url(settings.BASE_DRIVE_URL, *segments, **query)
开发者ID:CenterForOpenScience,项目名称:waterbutler,代码行数:2,代码来源:provider.py
示例9: web_view
def web_view(self):
segments = ('articles', self.parent['title'], str(self.article_id))
return build_url(settings.VIEW_URL, *segments)
开发者ID:cosenal,项目名称:waterbutler,代码行数:3,代码来源:metadata.py
示例10: build_view_url
def build_view_url(self, *segments):
segments = (self.owner, self.repo, 'blob') + segments
return provider.build_url(settings.VIEW_URL, *segments)
开发者ID:PatrickEGorman,项目名称:waterbutler,代码行数:3,代码来源:provider.py
示例11: web_view
def web_view(self):
if self.parent['status'].lower() == 'public':
segments = ('articles', self.parent['title'], str(self.article_id))
else:
segments = ('account', 'articles', str(self.article_id))
return build_url(settings.VIEW_URL, *segments)
开发者ID:545zhou,项目名称:waterbutler,代码行数:6,代码来源:metadata.py
注:本文中的waterbutler.core.provider.build_url函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论