diff MoinMoin/events/__init__.py @ 2633:f42fb1ae0a38

Fixes to the Event.name commit.
author Karol 'grzywacz' Nowak <grzywacz@sul.uni.lodz.pl>
date Thu, 26 Jul 2007 04:05:21 +0200
parents 35690680ecac
children 6e84127a1860
line wrap: on
line diff
--- a/MoinMoin/events/__init__.py	Tue Jul 24 02:11:32 2007 +0200
+++ b/MoinMoin/events/__init__.py	Thu Jul 26 04:05:21 2007 +0200
@@ -30,12 +30,19 @@
 
 class Event(object):
     """A class handling information common to all events."""
+
+    # NOTE: each Event subclass must have a unique name attribute
+    name = u"Event"
+
     def __init__(self, request):
         self.request = request
 
 
 class PageEvent(Event):
     """An event related to a page change"""
+
+    name = u"PageEvent"
+
     def __init__(self, request):
         Event.__init__(self, request)
 
@@ -177,6 +184,9 @@
     if handler returns
 
     """
+
+    name = u"PagePreSaveEvent"
+
     def __init__(self, request, page_editor, new_text):
         Event.__init__(self, request)
         self.page_editor = page_editor