From 003e522b5784f50bc6f41168d0b087cc25d2aa4f Mon Sep 17 00:00:00 2001 From: Malthe Borch Date: Fri, 29 Aug 2008 18:24:03 +0000 Subject: Added event notification after WSGI application is created and configured. --- repoze/bfg/interfaces.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'repoze/bfg/interfaces.py') diff --git a/repoze/bfg/interfaces.py b/repoze/bfg/interfaces.py index 3a4c45373..d1a8fc63a 100644 --- a/repoze/bfg/interfaces.py +++ b/repoze/bfg/interfaces.py @@ -1,6 +1,9 @@ +from zope.interface import implements from zope.interface import Interface from zope.interface import Attribute +from zope.component.interfaces import IObjectEvent + class IRequest(Interface): """ Marker interface for a request object """ @@ -84,3 +87,14 @@ class ISettings(Interface): """ Runtime settings for repoze.bfg """ reload_templates = Attribute('Reload templates when they change') +class IWSGIApplicationCreatedEvent(IObjectEvent): + """ Event issued after the application has been created and + configured.""" + + app = Attribute(u"Published application") + +class WSGIApplicationCreatedEvent(object): + implements(IWSGIApplicationCreatedEvent) + + def __init__(self, app): + self.app = app -- cgit v1.2.3