diff MoinMoin/events/__init__.py @ 2061:7547652ffb6f

Change Event -> Observable, add a helper PageEvent class.
author Karol 'grzywacz' Nowak <grzywacz@sul.uni.lodz.pl>
date Tue, 29 May 2007 19:28:54 +0200
parents fb6f1de06be0
children 5cc8f6714297
line wrap: on
line diff
--- a/MoinMoin/events/__init__.py	Tue May 29 19:00:28 2007 +0200
+++ b/MoinMoin/events/__init__.py	Tue May 29 19:28:54 2007 +0200
@@ -18,20 +18,22 @@
 # Create a list of extension actions from the package directory
 modules = pysupport.getPackageModules(__file__)
 
-class Event:
+class Observable:
     """A class handling information common to all events."""
+    pass
+        
+class PageEvent(Observable):
+    """An event related to a page change"""
     
     def __init__(self, request, page):
         self.request = request
         self.page = page
         
-class PageChangedEvent(Event):
+class PageChangedEvent(PageEvent):
     pass
-
-class PageRenamedEvent(Event):
+class PageRenamedEvent(PageEvent):
     pass
-
-class PageDeletedEvent(Event):
+class PageDeletedEvent(PageEvent):
     pass
         
 def register_handlers(cfg):