[Zope3-checkins] CVS: Zope3/src/zope/app/content - configure.zcml:1.8 dtmlpage.py:1.3
Stephan Richter
srichter@cbu.edu
Mon, 6 Jan 2003 10:46:58 -0500
Update of /cvs-repository/Zope3/src/zope/app/content
In directory cvs.zope.org:/tmp/cvs-serv496/content
Modified Files:
configure.zcml dtmlpage.py
Log Message:
Moved DTML Page interfaces into Interfaces subtree.
Fixed Bug 120 by using a similar approach as ZPT. Mmmh, are schema
properties not Interface Attributes? If not, then the interface security
directive does not seem to catch these and they are not protected. We
should really fix that.
=== Zope3/src/zope/app/content/configure.zcml 1.7 => 1.8 ===
--- Zope3/src/zope/app/content/configure.zcml:1.7 Mon Dec 30 14:44:55 2002
+++ Zope3/src/zope/app/content/configure.zcml Mon Jan 6 10:46:26 2003
@@ -170,11 +170,11 @@
attributes="__call__" />
<require permission="zope.ManageContent"
- interface="zope.app.content.dtmlpage.IDTMLPage" />
+ interface="zope.app.interfaces.content.dtmlpage.IDTMLPage"
+ set_attributes="source" />
<require permission="zope.View"
- interface="zope.app.content.dtmlpage.IRenderDTMLPage" />
-
+ interface="zope.app.interfaces.content.dtmlpage.IRenderDTMLPage" />
<implements
interface="zope.app.interfaces.annotation.IAttributeAnnotatable" />
=== Zope3/src/zope/app/content/dtmlpage.py 1.2 => 1.3 ===
--- Zope3/src/zope/app/content/dtmlpage.py:1.2 Wed Dec 25 09:12:48 2002
+++ Zope3/src/zope/app/content/dtmlpage.py Mon Jan 6 10:46:26 2003
@@ -14,49 +14,17 @@
"""
$Id$
"""
-import zope.schema
-
from persistence import Persistent
-from zope.interface import Interface, Attribute
from zope.app.interfaces.annotation import IAnnotatable
from zope.app.interfaces.content.file import IFileContent
+from zope.app.interfaces.content.dtmlpage import IDTMLPage, IRenderDTMLPage
from zope.proxy.context import ContextMethod
from zope.proxy.context import getWrapperContainer
from zope.security.proxy import ProxyFactory
from zope.documenttemplate.dt_html import HTML
-
-
-class IDTMLPage(Interface):
- """DTML Pages are a persistent implementation of DTML."""
-
- def setSource(text, content_type='text/html'):
- """Save the source of the page template."""
-
- def getSource():
- """Get the source of the page template."""
-
- source = zope.schema.Bytes(
- title=u"Source",
- description=u"""The source od the page template.""",
- required=True)
-
-
-class IRenderDTMLPage(Interface):
-
- content_type = Attribute('Content type of generated output')
-
- def render(request, *args, **kw):
- """Render the page template.
-
- The first argument is bound to the top-level 'request'
- variable. The positional arguments are bound to the 'args'
- variable and the keyword arguments are bound to the 'options'
- variable.
- """
-
class DTMLPage(Persistent):