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

Python xmlconfig.file函数代码示例

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

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



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

示例1: setUp

    def setUp(self):
        import zope.component
        context = xmlconfig.file('meta.zcml', zope.component)
        xmlconfig.file('configure.zcml', zope.component, context=context)

        import plone.event
        xmlconfig.file('configure.zcml', plone.event, context=context)
开发者ID:plone,项目名称:plone.event,代码行数:7,代码来源:test_adapters.py


示例2: setUpZope

 def setUpZope(self, app, configurationContext):
     import Products.CMFPlone
     xmlconfig.file(
         'configure.zcml',
         Products.CMFPlone,
         context=configurationContext
     )
开发者ID:CGTIC,项目名称:Plone_SP,代码行数:7,代码来源:testing.py


示例3: testView

 def testView(self):
     self.assertEqual(
         component.queryMultiAdapter((ob, request), name='test'), None)
     xmlconfig.file("xmlrpc.zcml", xmlrpc.tests)
     view = component.queryMultiAdapter((ob, request), name='test')
     self.assert_(V1 in view.__class__.__bases__)
     self.assert_(xmlrpc.MethodPublisher in view.__class__.__bases__)
开发者ID:CGTIC,项目名称:Plone_SP,代码行数:7,代码来源:test_directives.py


示例4: setUpZope

    def setUpZope(self, app, configurationContext):

        # Patch effectiveDate, so our FtwCalendarwidget is used
        from ftw.calendarwidget.browser.widgets import FtwCalendarWidget
        from Products.ATContentTypes.content.base import registerATCT
        from Products.ATContentTypes.content.document import ATDocument
        from Products.ATContentTypes.content.document import PROJECTNAME

        ATDocument.schema['effectiveDate'].widget = FtwCalendarWidget(
                label='MyDate'
            )

        registerATCT(ATDocument, PROJECTNAME)

        # Load ZCML

        xmlconfig.file('configure.zcml',
            ftw.calendarwidget,
            context=configurationContext)
        xmlconfig.file('configure.zcml',
            collective.js.jqueryui,
            context=configurationContext)

        # installProduct() is *only* necessary for packages outside
        # the Products.* namespace which are also declared as Zope 2 products,
        # using <five:registerPackage /> in ZCML.
        z2.installProduct(app, 'ftw.calendarwidget')
        z2.installProduct(app, 'collective.js.jqueryui')
开发者ID:4teamwork,项目名称:ftw.calendarwidget,代码行数:28,代码来源:testing.py


示例5: setUpZope

    def setUpZope(self, app, configurationContext):

        # Load ZCML
        import eastofeaton.logopanel
        xmlconfig.file('configure.zcml',
                       eastofeaton.logopanel,
                       context=configurationContext)
开发者ID:collective,项目名称:eastofeaton.logopanel,代码行数:7,代码来源:testing.py


示例6: setUp

        def setUp(self):
            import collective.js.speakjs
            xmlconfig.file('configure.zcml', collective.js.speakjs,
                           context=self['configurationContext'])

            with ploneSite() as portal:
                applyProfile(portal, 'collective.js.speakjs:default')
开发者ID:tisto,项目名称:plone.app.robotframework,代码行数:7,代码来源:testing.py


示例7: setUpZope

 def setUpZope(self, app, configurationContext):
     import plone.rest
     xmlconfig.file(
         'configure.zcml',
         plone.rest,
         context=configurationContext
     )
开发者ID:do3cc,项目名称:plone.rest,代码行数:7,代码来源:testing.py


示例8: setUpZope

    def setUpZope(self, app, configurationContext):

        # prepare installing Products.ATContentTypes
        import Products.ATContentTypes
        self.loadZCML(package=Products.ATContentTypes)

        z2.installProduct(app, 'Products.Archetypes')
        z2.installProduct(app, 'Products.ATContentTypes')
        z2.installProduct(app, 'plone.app.blob')

        # prepare installing plone.app.collection
        try:
            pkg_resources.get_distribution('plone.app.collection')
            z2.installProduct(app, 'plone.app.collection')
        except pkg_resources.DistributionNotFound:
            pass

        # prepare installing plone.app.contenttypes
        z2.installProduct(app, 'Products.DateRecurringIndex')

        import plone.app.contenttypes
        xmlconfig.file(
            'configure.zcml',
            plone.app.contenttypes,
            context=configurationContext
        )
开发者ID:RBINS,项目名称:plone.app.contenttypes,代码行数:26,代码来源:testing.py


示例9: setUpZope

 def setUpZope(self, app, configurationContext):
     # Load ZCML for this package
     import collective.contentrules.subscription
     xmlconfig.file('configure.zcml',
                    collective.contentrules.subscription,
                    context=configurationContext)
     z2.installProduct(app, 'collective.contentrules.subscription')
开发者ID:RedTurtle,项目名称:collective.contentrules.subscription,代码行数:7,代码来源:testing.py


示例10: setUp

    def setUp(self):
        self['configurationContext'] = zca.stackConfigurationContext(
            self.get('configurationContext'))

        import ftwbook.graphicblock.tests
        xmlconfig.file('tests.zcml', ftwbook.graphicblock.tests,
                       context=self['configurationContext'])
开发者ID:4teamwork,项目名称:ftwbook.graphicblock,代码行数:7,代码来源:testing.py


示例11: setUpZope

 def setUpZope(self, app, configurationContext):
     # Load ZCML for this package
     import collective.analyticspanel
     xmlconfig.file('configure.zcml',
                    collective.analyticspanel,
                    context=configurationContext)
     z2.installProduct(app, 'collective.analyticspanel')
开发者ID:luca-bellenghi,项目名称:collective.analyticspanel,代码行数:7,代码来源:testing.py


示例12: setUpZope

 def setUpZope(self, app, configurationContext):
     # Load ZCML for this package
     import misitio.policy
     xmlconfig.file('configure.zcml',
                    misitio.policy,
                    context=configurationContext)
     ztc.installProduct('Products.CMFPlacefulWorkflow')
开发者ID:ejgarcialearning,项目名称:misito.policy,代码行数:7,代码来源:testing.py


示例13: setUpZope

    def setUpZope(self, app, configurationContext):
        # Load ZCML
        import my315ok.socialorgnization
#        import xtshzz.policy
#        self.loadZCML(package=xtshzz.policy)
  
        xmlconfig.file('configure.zcml', my315ok.socialorgnization, context=configurationContext)        
开发者ID:adam139,项目名称:my315ok.socialorgnization,代码行数:7,代码来源:testing.py


示例14: setUpZope

    def setUpZope(self, app, configurationContext):
        # Load ZCML
        import ftw.footer

        xmlconfig.file('configure.zcml', ftw.footer,
                       context=configurationContext)
        z2.installProduct(app, 'ftw.footer')
开发者ID:sivanoff,项目名称:ftw.footer,代码行数:7,代码来源:testing.py


示例15: setUpZope

 def setUpZope(self, app, configurationContext):
     # Load ZCML for this package
     import aws.authrss
     xmlconfig.file('configure.zcml',
                    aws.authrss,
                    context=configurationContext)
     return
开发者ID:glenfant,项目名称:aws.authrss,代码行数:7,代码来源:resources.py


示例16: setUpZope

	def setUpZope(self, app, configurationContext):
		# Load ZCML
		import camara.policy
		xmlconfig.file('configure.zcml',
			camara.policy,
			context=configurationContext
		)
开发者ID:fabiosurrage,项目名称:camara.policy,代码行数:7,代码来源:testing.py


示例17: setUpZope

    def setUpZope(self, app, configurationContext):
        for locales in self._get_robot_variable('REGISTER_TRANSLATIONS'):
            if locales and os.path.isdir(locales):
                from zope.i18n.zcml import registerTranslations
                registerTranslations(configurationContext, locales)

        for name in self._get_robot_variable('META_PACKAGES'):
            if not name in sys.modules:
                __import__(name)
            package = sys.modules[name]
            xmlconfig.file('meta.zcml', package,
                           context=configurationContext)

        for name in self._get_robot_variable('CONFIGURE_PACKAGES'):
            if not name in sys.modules:
                __import__(name)
            package = sys.modules[name]
            xmlconfig.file('configure.zcml', package,
                           context=configurationContext)

        for name in self._get_robot_variable('OVERRIDE_PACKAGES'):
            if not name in sys.modules:
                __import__(name)
            package = sys.modules[name]
            xmlconfig.includeOverrides(
                configurationContext, 'overrides.zcml', package=package)

        for name in self._get_robot_variable('INSTALL_PRODUCTS'):
            if not name in sys.modules:
                __import__(name)
            z2.installProduct(app, name)
开发者ID:tisto,项目名称:plone.app.robotframework,代码行数:31,代码来源:testing.py


示例18: setUpZope

 def setUpZope(self, app, configurationContext):
     import plone.app.robotframework.tests
     xmlconfig.file(
         '_profiles.zcml',
         plone.app.robotframework.tests,
         context=configurationContext
     )
开发者ID:Aj22,项目名称:plone.app.robotframework,代码行数:7,代码来源:testing.py


示例19: testSetUp

    def testSetUp(self):
        import ftw.book.tests
        self['configurationContext'] = zca.stackConfigurationContext(
            self.get('configurationContext'))

        xmlconfig.file('latex.zcml', ftw.book.tests,
                       context=self['configurationContext'])
开发者ID:seantis,项目名称:ftw.book,代码行数:7,代码来源:testing.py


示例20: setUp

    def setUp(self):
        import collective.taskqueue
        xmlconfig.file('configure.zcml', collective.taskqueue,
                       context=self['configurationContext'])

        # Configure
        config = getConfiguration()
        config.product_config = {'collective.taskqueue': {'queue': self.queue}}
        taskqueue.reset()

        # Define logging request handler to replace ZPublisher
        def logging_handler(app, request, response):
            logger.info(request.getURL() + request.get("PATH_INFO"))
            response.stdout.write('HTTP/1.1 204\r\n')
            response.stdout.close()

        # Define ZPublisher-based request handler to be used with zserver
        def zserver_handler(app, request, response):
            from ZPublisher import publish_module
            publish_module(app, request=request, response=response)

        # Create TaskQueueServer
        from collective.taskqueue.server import TaskQueueServer
        if not self.zserver_enabled:
            self['server'] = TaskQueueServer(queue=self.queue,
                                             handler=logging_handler)
        else:
            self['server'] = TaskQueueServer(queue=self.queue,
                                             handler=zserver_handler,
                                             concurrent_limit=0)
开发者ID:affinitic,项目名称:collective.taskqueue,代码行数:30,代码来源:testing.py



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
Python xmlconfig.registerCommonDirectives函数代码示例发布时间:2022-05-26
下一篇:
Python config.ConfigurationMachine类代码示例发布时间: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