def update(self): if not self.__installed__: raise interfaces.ProductNotInstalledError( _('Product is not installed.')) configure(self, {}) event.notify( interfaces.ProductUpdatedEvent(self.__product_name__, self)) event.notify(ObjectModifiedEvent(getSite())) self._checkRequiredUpdate()
def _bootstrap_zodb(conn, root_name): root = conn.root() created = False if not root_name in root: root_folder = rootFolder() notify(zope.lifecycleevent.ObjectCreatedEvent(root_folder)) root[root_name] = root_folder if not zope.component.interfaces.ISite.providedBy(root_folder): site_manager = site.LocalSiteManager(root_folder) root_folder.setSiteManager(site_manager) transaction.commit() created = True try: from z3c.configurator import configure except ImportError: pass else: logging.info('We have z3c.configurator, fire his events!') configure(root_folder, {}) logging.info('Firing events...') notify(zope.processlifetime.DatabaseOpenedWithRoot(conn.db())) return created
def reconfigureSite(app, *args): site = removeSecurityProxy(app) configure(site, {})
def siteAdded(site, event): configure(site, {}, names=['_initialize',])
def reconfigurePortal(app, *args): portal = removeSecurityProxy(app) configure(portal, {})