Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(321)  |  Call(155)  |  Derive(0)  |  Import(166)
Return the global Zope configuration object.

If a configuration hasn't been set yet, generates a simple
configuration object and uses that.  Once generated, it may not be
overridden by calling ``setConfiguration()``.

        def getConfiguration():
    """Return the global Zope configuration object.

    If a configuration hasn't been set yet, generates a simple
    configuration object and uses that.  Once generated, it may not be
    overridden by calling ``setConfiguration()``.
    """
    if _config is None:
        setConfiguration(DefaultConfiguration())
    return _config
        


src/z/o/Zope2-2.13.22/src/Zope2/Startup/__init__.py   Zope2(Download)
        self.startZope()
        self.serverListen()
        from App.config import getConfiguration
        config = getConfiguration()
        self.registerSignals()
    def run(self):
        # the mainloop.
        try:
            from App.config import getConfiguration
            config = getConfiguration()

src/z/o/Zope2-2.13.22/src/App/ApplicationManager.py   Zope2(Download)
from Acquisition import Implicit
from App.CacheManager import CacheManager
from App.config import getConfiguration
from App.DavLockManager import DavLockManager
from App.special_dtml import DTMLFile
    def getDatabaseNames(self, quote=False):
        configuration = getConfiguration()
        names = configuration.dbtab.listDatabaseNames()
        names.sort()
        if quote:
            return [(name, urllib.quote(name)) for name in names]
        return names
 
    def __getitem__(self, name):
        configuration = getConfiguration()
    def __bobo_traverse__(self, request, name):
        configuration = getConfiguration()
        if configuration.dbtab.hasDatabase(name):
            return self[name]
        return getattr(self, name)
    def version_list(self):
        # Return a list of currently installed products/versions
        cfg = getConfiguration()
        product_dir = os.path.join(cfg.softwarehome,'Products')
        product_names = os.listdir(product_dir)

src/z/o/Zope-HEAD/src/Zope2/Startup/__init__.py   Zope(Download)
        self.startZope()
        self.serverListen()
        from App.config import getConfiguration
        config = getConfiguration()
        self.registerSignals()
    def run(self):
        # the mainloop.
        try:
            from App.config import getConfiguration
            config = getConfiguration()

src/z/o/Zope-HEAD/src/App/ApplicationManager.py   Zope(Download)
from Acquisition import Implicit
from App.CacheManager import CacheManager
from App.config import getConfiguration
from App.DavLockManager import DavLockManager
from App.special_dtml import DTMLFile
    def getDatabaseNames(self, quote=False):
        configuration = getConfiguration()
        names = configuration.dbtab.listDatabaseNames()
        names.sort()
        if quote:
            return [(name, urllib.quote(name)) for name in names]
        return names
 
    def __getitem__(self, name):
        configuration = getConfiguration()
    def __bobo_traverse__(self, request, name):
        configuration = getConfiguration()
        if configuration.dbtab.hasDatabase(name):
            return self[name]
        return getattr(self, name)

src/e/r/erp5-HEAD/product/ERP5Type/patches/User.py   erp5(Download)
    if 'Developer' in object_roles:
      object_roles.remove('Developer')
      product_config = getattr(getConfiguration(), 'product_config', None)
      if product_config:
        config = product_config.get('erp5')
BasicUser.allowed = allowed
 
from App.config import getConfiguration
from AccessControl.User import SimpleUser
 
  role_tuple = SimpleUser_getRoles(self)
  if role_tuple:
    product_config = getattr(getConfiguration(), 'product_config', None)
    if product_config:
      config = product_config.get('erp5')

src/i/n/infrae.wsgi-2.2.1/src/infrae/wsgi/paster.py   infrae.wsgi(Download)
def set_zope_debug_mode(debug_mode):
    """Set the Zope debug mode to the given value.
    """
    config = App.config.getConfiguration()
    config.debug_mode = debug_mode and 1 or 0
def mount_all_databases():
    """Call this to mount all available Zope databases.
    """
    config = App.config.getConfiguration()
    connection = Zope2.DB.open()

src/e/r/erp5-HEAD/product/ERP5Type/patches/PropertiedUser.py   erp5(Download)
    return list( self.getRoles() ) + local.keys()
 
from App.config import getConfiguration
 
def getRoles( self ):
    role_tuple = self._roles.keys()
    if role_tuple:
        product_config = getattr(getConfiguration(), 'product_config', None)
        if product_config:
            config = product_config.get('erp5')
    if 'Developer' in object_roles:
      object_roles.remove('Developer')
      product_config = getattr(getConfiguration(), 'product_config', None)
      if product_config:
        config = product_config.get('erp5')

src/p/l/plone.app.robotframework-0.9.2/src/plone/app/robotframework/server.py   plone.app.robotframework(Download)
    if HAS_DEBUG_MODE:
        import App.config
        config = App.config.getConfiguration()
        config.debug_mode = HAS_DEBUG_MODE
        App.config.setConfiguration(config)
            if HAS_DEBUG_MODE and name == 'plone.testing.z2.Startup':
                import App.config
                config = App.config.getConfiguration()
                config.debug_mode = HAS_DEBUG_MODE
                App.config.setConfiguration(config)

src/z/o/Zope2-2.13.22/src/Zope2/App/startup.py   Zope2(Download)
from Acquisition import aq_parent
from Acquisition.interfaces import IAcquirer
from App.config import getConfiguration
from time import asctime
from zExceptions import Redirect
    OFS.Application.import_products()
 
    configuration = getConfiguration()
 
    # Open the database
    def logConflicts(self, v, REQUEST):
        self.conflict_errors += 1
        level = getattr(getConfiguration(), 'conflict_error_log_level', 0)
        if not self.conflict_logger.isEnabledFor(level):
            return False

src/e/r/erp5-HEAD/product/ERP5Type/Globals.py   erp5(Download)
from App.Dialogs import MessageDialog
 
from App.config import getConfiguration as _getConfiguration
_cfg = _getConfiguration()
 

  1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9  Next