[z3-checkins] r28623 - z3/Sfive/trunk

philikon at codespeak.net philikon at codespeak.net
Sat Jun 10 17:00:17 CEST 2006


Author: philikon
Date: Sat Jun 10 17:00:09 2006
New Revision: 28623

Modified:
   z3/Sfive/trunk/presentation.py
Log:
Get rid of weird __init__ (very zope 2 specific)
Provide some sane default values
Provide an IFactory utility component


Modified: z3/Sfive/trunk/presentation.py
==============================================================================
--- z3/Sfive/trunk/presentation.py	(original)
+++ z3/Sfive/trunk/presentation.py	Sat Jun 10 17:00:09 2006
@@ -1,5 +1,6 @@
 import zope.interface
 import zope.component
+from zope.component.factory import Factory
 from zope.size.interfaces import ISized
 from zope.i18nmessageid import MessageFactory
 _ = MessageFactory('sfive')
@@ -9,11 +10,14 @@
 
 class Presentation(SimpleItem):
     zope.interface.implements(IPresentation)
-    meta_type = 'Sfive Presentation'
 
-    def __init__(self, id, title):
-        self.id = id
-        self.title = title
+    title = u''
+    presenter = u''
+    affiliation = u''
+    location = u''
+    text = u''
+
+PresentationFactory = Factory(Presentation)
 
 class PresentationSize(object):
     """Size adapter for `Presentation`.


More information about the z3-checkins mailing list