Ignore:
Timestamp:
9 Aug 2012, 09:58:07 (12 years ago)
Author:
uli
Message:

Add support for virtual jobs container (traverse to global
IJobManager) and do imports from subpackages locally (in order to
start fixing circular import problems).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/branches/uli-zc-async/src/waeup/kofa/app.py

    r7819 r9103  
    1818import grok
    1919from zope.authentication.interfaces import IAuthentication
    20 from zope.component import getUtilitiesFor
     20from zope.component import getUtility, getUtilitiesFor
    2121from zope.component.interfaces import ObjectEvent
    2222from zope.pluggableauth import PluggableAuthentication
    2323from waeup.kofa.authentication import setup_authentication
    2424from waeup.kofa.datacenter import DataCenter
    25 from waeup.kofa.students.container import StudentsContainer
    26 from waeup.kofa.hostels.container import HostelsContainer
    2725from waeup.kofa.interfaces import (
    28     IUniversity, IKofaPluggable, IObjectUpgradeEvent, )
     26    IUniversity, IKofaPluggable, IObjectUpgradeEvent, IJobManager,
     27    VIRT_JOBS_CONTAINER_NAME)
    2928from waeup.kofa.userscontainer import UsersContainer
    3029from waeup.kofa.utils.logger import Logger
     
    5453        the like.
    5554        """
     55        from waeup.kofa.students.container import StudentsContainer
     56        from waeup.kofa.hostels.container import HostelsContainer
     57
    5658        self['users'] = UsersContainer()
    5759        self['datacenter'] = DataCenter()
     
    6769            plugin.setup(self, name, self.logger)
    6870        return
     71
     72    def traverse(self, name):
     73        if name == VIRT_JOBS_CONTAINER_NAME:
     74            return getUtility(IJobManager)
     75        return None
    6976
    7077    def updatePlugins(self):
Note: See TracChangeset for help on using the changeset viewer.