[Zope-CVS] SVN: messageboard/trunk/step0 Allow IFile objects
(images and files) to be inside a message
Stephan Richter
srichter at cosmos.phy.tufts.edu
Mon May 17 17:25:30 EDT 2004
Log message for revision 24793:
Allow IFile objects (images and files) to be inside a message
(attachments).
-=-
Modified: messageboard/trunk/step01/interfaces.py
===================================================================
--- messageboard/trunk/step01/interfaces.py 2004-05-17 21:08:33 UTC (rev 24792)
+++ messageboard/trunk/step01/interfaces.py 2004-05-17 21:25:30 UTC (rev 24793)
@@ -22,6 +22,7 @@
from zope.app.container.constraints import ContainerTypesConstraint
from zope.app.container.constraints import ItemTypePrecondition
from zope.app.container.interfaces import IContainer
+from zope.app.file.interfaces import IFile
class IMessage(IContainer):
@@ -60,6 +61,6 @@
IMessage['__setitem__'].setTaggedValue('precondition',
- ItemTypePrecondition(IMessage))
+ ItemTypePrecondition(IMessage, IFile))
IMessage.setTaggedValue('__parent__', Field(
constraint=ContainerTypesConstraint(IMessageBoard, IMessage)))
Modified: messageboard/trunk/step02/interfaces.py
===================================================================
--- messageboard/trunk/step02/interfaces.py 2004-05-17 21:08:33 UTC (rev 24792)
+++ messageboard/trunk/step02/interfaces.py 2004-05-17 21:25:30 UTC (rev 24793)
@@ -22,6 +22,7 @@
from zope.app.container.constraints import ContainerTypesConstraint
from zope.app.container.constraints import ItemTypePrecondition
from zope.app.container.interfaces import IContainer
+from zope.app.file.interfaces import IFile
class IMessage(IContainer):
@@ -60,6 +61,6 @@
IMessage['__setitem__'].setTaggedValue('precondition',
- ItemTypePrecondition(IMessage))
+ ItemTypePrecondition(IMessage, IFile))
IMessage.setTaggedValue('__parent__', Field(
constraint=ContainerTypesConstraint(IMessageBoard, IMessage)))
Modified: messageboard/trunk/step03/interfaces.py
===================================================================
--- messageboard/trunk/step03/interfaces.py 2004-05-17 21:08:33 UTC (rev 24792)
+++ messageboard/trunk/step03/interfaces.py 2004-05-17 21:25:30 UTC (rev 24793)
@@ -24,6 +24,7 @@
from zope.app.container.constraints import ContainerTypesConstraint
from zope.app.container.constraints import ItemTypePrecondition
from zope.app.container.interfaces import IContainer
+from zope.app.file.interfaces import IFile
from fields import HTML
@@ -69,7 +70,7 @@
IMessage['__setitem__'].setTaggedValue('precondition',
- ItemTypePrecondition(IMessage))
+ ItemTypePrecondition(IMessage, IFile))
IMessage.setTaggedValue('__parent__', Field(
constraint=ContainerTypesConstraint(IMessageBoard, IMessage)))
Modified: messageboard/trunk/step04/interfaces.py
===================================================================
--- messageboard/trunk/step04/interfaces.py 2004-05-17 21:08:33 UTC (rev 24792)
+++ messageboard/trunk/step04/interfaces.py 2004-05-17 21:25:30 UTC (rev 24793)
@@ -24,6 +24,7 @@
from zope.app.container.constraints import ContainerTypesConstraint
from zope.app.container.constraints import ItemTypePrecondition
from zope.app.container.interfaces import IContainer
+from zope.app.file.interfaces import IFile
from fields import HTML
@@ -69,7 +70,7 @@
IMessage['__setitem__'].setTaggedValue('precondition',
- ItemTypePrecondition(IMessage))
+ ItemTypePrecondition(IMessage, IFile))
IMessage.setTaggedValue('__parent__', Field(
constraint=ContainerTypesConstraint(IMessageBoard, IMessage)))
More information about the Zope-CVS
mailing list