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


Python Configurator.setup_registry方法代码示例

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


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

示例1: setup_registry

# 需要导入模块: from pyramid.configuration import Configurator [as 别名]
# 或者: from pyramid.configuration.Configurator import setup_registry [as 别名]
 def setup_registry(self,
                    filter_specification_factory=None,
                    order_specification_factory=None,
                    service=None,
                    cql_filter_specification_visitor=None,
                    sql_filter_specification_visitor=None,
                    eval_filter_specification_visitor=None,
                    cql_order_specification_visitor=None,
                    sql_order_specification_visitor=None,
                    eval_order_specification_visitor=None,
                    url_converter=None,
                    **kw):
     # Set default values for options.
     if filter_specification_factory is None:
         filter_specification_factory = FilterSpecificationFactory()
     if order_specification_factory is None:
         order_specification_factory = OrderSpecificationFactory()
     if service is None:
         service = Service()
     if cql_filter_specification_visitor is None:
         cql_filter_specification_visitor = CqlFilterSpecificationVisitor
     if sql_filter_specification_visitor is None:
         sql_filter_specification_visitor = SqlFilterSpecificationVisitor
     if eval_filter_specification_visitor is None:
         eval_filter_specification_visitor = \
                                 ObjectFilterSpecificationVisitor
     if cql_order_specification_visitor is None:
         cql_order_specification_visitor = CqlOrderSpecificationVisitor
     if sql_order_specification_visitor is None:
         sql_order_specification_visitor = SqlOrderSpecificationVisitor
     if eval_order_specification_visitor is None:
         eval_order_specification_visitor = ObjectOrderSpecificationVisitor
     if url_converter is None:
         url_converter = ResourceUrlConverter
     PyramidConfigurator.setup_registry(self, **kw)
     self.__setup_everest(
            filter_specification_factory=filter_specification_factory,
            order_specification_factory=order_specification_factory,
            service=service,
            cql_filter_specification_visitor=
                                 cql_filter_specification_visitor,
            sql_filter_specification_visitor=
                                 sql_filter_specification_visitor,
            eval_filter_specification_visitor=
                                 eval_filter_specification_visitor,
            cql_order_specification_visitor=
                                 cql_order_specification_visitor,
            sql_order_specification_visitor=
                                 sql_order_specification_visitor,
            eval_order_specification_visitor=
                                 eval_order_specification_visitor,
            url_converter=url_converter)
开发者ID:BigData-Tools,项目名称:everest,代码行数:54,代码来源:configuration.py


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