[Zope-CVS] SVN: book/trunk/messageboard/step Updated examples to
reflect latest API changes.
Stephan Richter
srichter at cosmos.phy.tufts.edu
Mon Aug 30 20:41:37 EDT 2004
Log message for revision 27355:
Updated examples to reflect latest API changes.
Changed:
U book/trunk/messageboard/step07/message.py
U book/trunk/messageboard/step07/tests/test_message.py
U book/trunk/messageboard/step08/message.py
U book/trunk/messageboard/step08/tests/test_message.py
U book/trunk/messageboard/step09/message.py
U book/trunk/messageboard/step09/tests/test_message.py
U book/trunk/messageboard/step10/message.py
U book/trunk/messageboard/step10/tests/test_message.py
U book/trunk/messageboard/step11/configure.zcml
U book/trunk/messageboard/step11/message.py
U book/trunk/messageboard/step11/tests/test_message.py
U book/trunk/messageboard/step11/xmlrpc.py
U book/trunk/messageboard/step12/configure.zcml
U book/trunk/messageboard/step12/message.py
U book/trunk/messageboard/step12/tests/test_message.py
U book/trunk/messageboard/step12/xmlrpc.py
U book/trunk/messageboard/step13/browser/message.py
U book/trunk/messageboard/step13/configure.zcml
U book/trunk/messageboard/step13/message.py
U book/trunk/messageboard/step13/messageboard.py
U book/trunk/messageboard/step13/tests/test_message.py
U book/trunk/messageboard/step13/xmlrpc.py
-=-
Modified: book/trunk/messageboard/step07/message.py
===================================================================
--- book/trunk/messageboard/step07/message.py 2004-08-30 20:20:41 UTC (rev 27354)
+++ book/trunk/messageboard/step07/message.py 2004-08-31 00:41:36 UTC (rev 27355)
@@ -204,7 +204,7 @@
__used_for__ = IMessage
def __init__(self, context):
- self.context = context
+ self.context = self.__parent__ = context
self._annotations = IAnnotations(context)
if not self._annotations.get(SubscriberKey):
self._annotations[SubscriberKey] = ()
Modified: book/trunk/messageboard/step07/tests/test_message.py
===================================================================
--- book/trunk/messageboard/step07/tests/test_message.py 2004-08-30 20:20:41 UTC (rev 27354)
+++ book/trunk/messageboard/step07/tests/test_message.py 2004-08-31 00:41:36 UTC (rev 27355)
@@ -41,7 +41,7 @@
return Message()
-def setUp():
+def setUp(test):
placelesssetup.setUp()
classImplements(Message, IAttributeAnnotatable)
ztapi.provideAdapter(IAttributeAnnotatable, IAnnotations,
Modified: book/trunk/messageboard/step08/message.py
===================================================================
--- book/trunk/messageboard/step08/message.py 2004-08-30 20:20:41 UTC (rev 27354)
+++ book/trunk/messageboard/step08/message.py 2004-08-31 00:41:36 UTC (rev 27355)
@@ -204,7 +204,7 @@
__used_for__ = IMessage
def __init__(self, context):
- self.context = context
+ self.context = self.__parent__ = context
self._annotations = IAnnotations(context)
if not self._annotations.get(SubscriberKey):
self._annotations[SubscriberKey] = ()
Modified: book/trunk/messageboard/step08/tests/test_message.py
===================================================================
--- book/trunk/messageboard/step08/tests/test_message.py 2004-08-30 20:20:41 UTC (rev 27354)
+++ book/trunk/messageboard/step08/tests/test_message.py 2004-08-31 00:41:36 UTC (rev 27355)
@@ -41,7 +41,7 @@
return Message()
-def setUp():
+def setUp(test):
placelesssetup.setUp()
classImplements(Message, IAttributeAnnotatable)
ztapi.provideAdapter(IAttributeAnnotatable, IAnnotations,
Modified: book/trunk/messageboard/step09/message.py
===================================================================
--- book/trunk/messageboard/step09/message.py 2004-08-30 20:20:41 UTC (rev 27354)
+++ book/trunk/messageboard/step09/message.py 2004-08-31 00:41:36 UTC (rev 27355)
@@ -204,7 +204,7 @@
__used_for__ = IMessage
def __init__(self, context):
- self.context = context
+ self.context = self.__parent__ = context
self._annotations = IAnnotations(context)
if not self._annotations.get(SubscriberKey):
self._annotations[SubscriberKey] = ()
Modified: book/trunk/messageboard/step09/tests/test_message.py
===================================================================
--- book/trunk/messageboard/step09/tests/test_message.py 2004-08-30 20:20:41 UTC (rev 27354)
+++ book/trunk/messageboard/step09/tests/test_message.py 2004-08-31 00:41:36 UTC (rev 27355)
@@ -41,7 +41,7 @@
return Message()
-def setUp():
+def setUp(test):
placelesssetup.setUp()
classImplements(Message, IAttributeAnnotatable)
ztapi.provideAdapter(IAttributeAnnotatable, IAnnotations,
Modified: book/trunk/messageboard/step10/message.py
===================================================================
--- book/trunk/messageboard/step10/message.py 2004-08-30 20:20:41 UTC (rev 27354)
+++ book/trunk/messageboard/step10/message.py 2004-08-31 00:41:36 UTC (rev 27355)
@@ -205,7 +205,7 @@
__used_for__ = IMessage
def __init__(self, context):
- self.context = context
+ self.context = self.__parent__ = context
self._annotations = IAnnotations(context)
if not self._annotations.get(SubscriberKey):
self._annotations[SubscriberKey] = ()
Modified: book/trunk/messageboard/step10/tests/test_message.py
===================================================================
--- book/trunk/messageboard/step10/tests/test_message.py 2004-08-30 20:20:41 UTC (rev 27354)
+++ book/trunk/messageboard/step10/tests/test_message.py 2004-08-31 00:41:36 UTC (rev 27355)
@@ -41,7 +41,7 @@
return Message()
-def setUp():
+def setUp(test):
placelesssetup.setUp()
classImplements(Message, IAttributeAnnotatable)
ztapi.provideAdapter(IAttributeAnnotatable, IAnnotations,
Modified: book/trunk/messageboard/step11/configure.zcml
===================================================================
--- book/trunk/messageboard/step11/configure.zcml 2004-08-30 20:20:41 UTC (rev 27354)
+++ book/trunk/messageboard/step11/configure.zcml 2004-08-31 00:41:36 UTC (rev 27355)
@@ -149,29 +149,19 @@
</content>
<xmlrpc:view
- name="methods"
for=".interfaces.IMessageBoard"
permission="book.messageboard.Edit"
- allowed_attributes="getMessageNames addMessage deleteMessage
- getDescription setDescription"
+ methods="getMessageNames addMessage deleteMessage
+ getDescription setDescription"
class=".xmlrpc.MessageBoardMethods" />
-
- <xmlrpc:defaultView
- for=".interfaces.IMessageBoard"
- name="methods" />
<xmlrpc:view
- name="methods"
for=".interfaces.IMessage"
permission="book.messageboard.Edit"
- allowed_attributes="getMessageNames addMessage deleteMessage
- getTitle setTitle getBody setBody"
+ methods="getMessageNames addMessage deleteMessage
+ getTitle setTitle getBody setBody"
class=".xmlrpc.MessageMethods" />
- <xmlrpc:defaultView
- for=".interfaces.IMessage"
- name="methods" />
-
<mail:smtpMailer name="msgboard-smtp" hostname="localhost" port="25" />
<mail:queuedDelivery
Modified: book/trunk/messageboard/step11/message.py
===================================================================
--- book/trunk/messageboard/step11/message.py 2004-08-30 20:20:41 UTC (rev 27354)
+++ book/trunk/messageboard/step11/message.py 2004-08-31 00:41:36 UTC (rev 27355)
@@ -205,7 +205,7 @@
__used_for__ = IMessage
def __init__(self, context):
- self.context = context
+ self.context = self.__parent__ = context
self._annotations = IAnnotations(context)
if not self._annotations.get(SubscriberKey):
self._annotations[SubscriberKey] = ()
Modified: book/trunk/messageboard/step11/tests/test_message.py
===================================================================
--- book/trunk/messageboard/step11/tests/test_message.py 2004-08-30 20:20:41 UTC (rev 27354)
+++ book/trunk/messageboard/step11/tests/test_message.py 2004-08-31 00:41:36 UTC (rev 27355)
@@ -41,7 +41,7 @@
return Message()
-def setUp():
+def setUp(test):
placelesssetup.setUp()
classImplements(Message, IAttributeAnnotatable)
ztapi.provideAdapter(IAttributeAnnotatable, IAnnotations,
Modified: book/trunk/messageboard/step11/xmlrpc.py
===================================================================
--- book/trunk/messageboard/step11/xmlrpc.py 2004-08-30 20:20:41 UTC (rev 27354)
+++ book/trunk/messageboard/step11/xmlrpc.py 2004-08-31 00:41:36 UTC (rev 27355)
@@ -16,7 +16,7 @@
$Id$
"""
from zope.event import notify
-from zope.publisher.xmlrpc import MethodPublisher
+from zope.app.publisher.xmlrpc import MethodPublisher
from zope.app.event.objectevent import ObjectCreatedEvent, ObjectModifiedEvent
Modified: book/trunk/messageboard/step12/configure.zcml
===================================================================
--- book/trunk/messageboard/step12/configure.zcml 2004-08-30 20:20:41 UTC (rev 27354)
+++ book/trunk/messageboard/step12/configure.zcml 2004-08-31 00:41:36 UTC (rev 27355)
@@ -155,29 +155,19 @@
</content>
<xmlrpc:view
- name="methods"
for=".interfaces.IMessageBoard"
permission="book.messageboard.Edit"
- allowed_attributes="getMessageNames addMessage deleteMessage
- getDescription setDescription"
+ methods="getMessageNames addMessage deleteMessage
+ getDescription setDescription"
class=".xmlrpc.MessageBoardMethods" />
-
- <xmlrpc:defaultView
- for=".interfaces.IMessageBoard"
- name="methods" />
<xmlrpc:view
- name="methods"
for=".interfaces.IMessage"
permission="book.messageboard.Edit"
- allowed_attributes="getMessageNames addMessage deleteMessage
- getTitle setTitle getBody setBody"
+ methods="getMessageNames addMessage deleteMessage
+ getTitle setTitle getBody setBody"
class=".xmlrpc.MessageMethods" />
- <xmlrpc:defaultView
- for=".interfaces.IMessage"
- name="methods" />
-
<mail:smtpMailer name="msgboard-smtp" hostname="localhost" port="25" />
<mail:queuedDelivery
Modified: book/trunk/messageboard/step12/message.py
===================================================================
--- book/trunk/messageboard/step12/message.py 2004-08-30 20:20:41 UTC (rev 27354)
+++ book/trunk/messageboard/step12/message.py 2004-08-31 00:41:36 UTC (rev 27355)
@@ -205,7 +205,7 @@
__used_for__ = IMessage
def __init__(self, context):
- self.context = context
+ self.context = self.__parent__ = context
self._annotations = IAnnotations(context)
if not self._annotations.get(SubscriberKey):
self._annotations[SubscriberKey] = ()
Modified: book/trunk/messageboard/step12/tests/test_message.py
===================================================================
--- book/trunk/messageboard/step12/tests/test_message.py 2004-08-30 20:20:41 UTC (rev 27354)
+++ book/trunk/messageboard/step12/tests/test_message.py 2004-08-31 00:41:36 UTC (rev 27355)
@@ -41,7 +41,7 @@
return Message()
-def setUp():
+def setUp(test):
placelesssetup.setUp()
classImplements(Message, IAttributeAnnotatable)
ztapi.provideAdapter(IAttributeAnnotatable, IAnnotations,
Modified: book/trunk/messageboard/step12/xmlrpc.py
===================================================================
--- book/trunk/messageboard/step12/xmlrpc.py 2004-08-30 20:20:41 UTC (rev 27354)
+++ book/trunk/messageboard/step12/xmlrpc.py 2004-08-31 00:41:36 UTC (rev 27355)
@@ -16,7 +16,7 @@
$Id$
"""
from zope.event import notify
-from zope.publisher.xmlrpc import MethodPublisher
+from zope.app.publisher.xmlrpc import MethodPublisher
from zope.app.event.objectevent import ObjectCreatedEvent, ObjectModifiedEvent
Modified: book/trunk/messageboard/step13/browser/message.py
===================================================================
--- book/trunk/messageboard/step13/browser/message.py 2004-08-30 20:20:41 UTC (rev 27354)
+++ book/trunk/messageboard/step13/browser/message.py 2004-08-31 00:41:36 UTC (rev 27355)
@@ -60,7 +60,7 @@
# Find the messageboard and get the theme preference
obj = self.context
- while not IMessageBoard.isImplementedBy(obj) and \
+ while not IMessageBoard.providedBy(obj) and \
obj is not None:
obj = zapi.getParent(obj)
Modified: book/trunk/messageboard/step13/configure.zcml
===================================================================
--- book/trunk/messageboard/step13/configure.zcml 2004-08-30 20:20:41 UTC (rev 27354)
+++ book/trunk/messageboard/step13/configure.zcml 2004-08-31 00:41:36 UTC (rev 27355)
@@ -178,29 +178,19 @@
</content>
<xmlrpc:view
- name="methods"
for=".interfaces.IMessageBoard"
permission="book.messageboard.Edit"
- allowed_attributes="getMessageNames addMessage deleteMessage
- getDescription setDescription"
+ methods="getMessageNames addMessage deleteMessage
+ getDescription setDescription"
class=".xmlrpc.MessageBoardMethods" />
-
- <xmlrpc:defaultView
- for=".interfaces.IMessageBoard"
- name="methods" />
<xmlrpc:view
- name="methods"
for=".interfaces.IMessage"
permission="book.messageboard.Edit"
- allowed_attributes="getMessageNames addMessage deleteMessage
- getTitle setTitle getBody setBody"
+ methods="getMessageNames addMessage deleteMessage
+ getTitle setTitle getBody setBody"
class=".xmlrpc.MessageMethods" />
- <xmlrpc:defaultView
- for=".interfaces.IMessage"
- name="methods" />
-
<mail:smtpMailer name="msgboard-smtp" hostname="localhost" port="25" />
<mail:queuedDelivery
Modified: book/trunk/messageboard/step13/message.py
===================================================================
--- book/trunk/messageboard/step13/message.py 2004-08-30 20:20:41 UTC (rev 27354)
+++ book/trunk/messageboard/step13/message.py 2004-08-31 00:41:36 UTC (rev 27355)
@@ -205,7 +205,7 @@
__used_for__ = IMessage
def __init__(self, context):
- self.context = context
+ self.context = self.__parent__ = context
self._annotations = IAnnotations(context)
if not self._annotations.get(SubscriberKey):
self._annotations[SubscriberKey] = ()
Modified: book/trunk/messageboard/step13/messageboard.py
===================================================================
--- book/trunk/messageboard/step13/messageboard.py 2004-08-30 20:20:41 UTC (rev 27354)
+++ book/trunk/messageboard/step13/messageboard.py 2004-08-31 00:41:36 UTC (rev 27355)
@@ -71,7 +71,7 @@
__used_for__ = IMessageBoard
def __init__(self, context):
- self.context = context
+ self.context = self.__parent__ = context
self._annotations = IAnnotations(context)
if self._annotations.get(ThemeKey, None) is None:
self._annotations[ThemeKey] = 'default'
Modified: book/trunk/messageboard/step13/tests/test_message.py
===================================================================
--- book/trunk/messageboard/step13/tests/test_message.py 2004-08-30 20:20:41 UTC (rev 27354)
+++ book/trunk/messageboard/step13/tests/test_message.py 2004-08-31 00:41:36 UTC (rev 27355)
@@ -41,7 +41,7 @@
return Message()
-def setUp():
+def setUp(test):
placelesssetup.setUp()
classImplements(Message, IAttributeAnnotatable)
ztapi.provideAdapter(IAttributeAnnotatable, IAnnotations,
Modified: book/trunk/messageboard/step13/xmlrpc.py
===================================================================
--- book/trunk/messageboard/step13/xmlrpc.py 2004-08-30 20:20:41 UTC (rev 27354)
+++ book/trunk/messageboard/step13/xmlrpc.py 2004-08-31 00:41:36 UTC (rev 27355)
@@ -16,7 +16,7 @@
$Id$
"""
from zope.event import notify
-from zope.publisher.xmlrpc import MethodPublisher
+from zope.app.publisher.xmlrpc import MethodPublisher
from zope.app.event.objectevent import ObjectCreatedEvent, ObjectModifiedEvent
More information about the Zope-CVS
mailing list