[Zope3-checkins]
SVN: Zope3/branches/srichter-blow-services/src/zope/app/presentation/
Got page folders working. I am still having some system
errors for some
Stephan Richter
srichter at cosmos.phy.tufts.edu
Fri Feb 4 16:53:19 EST 2005
Log message for revision 29047:
Got page folders working. I am still having some system errors for some
screens with respect to the registration, but that's not so bad.
Changed:
U Zope3/branches/srichter-blow-services/src/zope/app/presentation/browser.zcml
U Zope3/branches/srichter-blow-services/src/zope/app/presentation/configure.zcml
U Zope3/branches/srichter-blow-services/src/zope/app/presentation/registration.py
-=-
Modified: Zope3/branches/srichter-blow-services/src/zope/app/presentation/browser.zcml
===================================================================
--- Zope3/branches/srichter-blow-services/src/zope/app/presentation/browser.zcml 2005-02-04 21:52:31 UTC (rev 29046)
+++ Zope3/branches/srichter-blow-services/src/zope/app/presentation/browser.zcml 2005-02-04 21:53:18 UTC (rev 29047)
@@ -80,13 +80,13 @@
schema=".interfaces.IPageRegistration"
name="addRegistration.html"
class="zope.app.component.browser.registration.AddComponentRegistration"
- content_factory=".registration.PageRegistration"
- keyword_arguments="required factoryName name permission attribute"
- set_before_add="template"
label="Register a view ZPT"
permission="zope.ManageSite"
fields="required name
template factoryName permission status attribute"
+ content_factory=".registration.PageRegistration"
+ arguments="name"
+ keyword_arguments="required permission factoryName template attribute"
/>
</configure>
Modified: Zope3/branches/srichter-blow-services/src/zope/app/presentation/configure.zcml
===================================================================
--- Zope3/branches/srichter-blow-services/src/zope/app/presentation/configure.zcml 2005-02-04 21:52:31 UTC (rev 29046)
+++ Zope3/branches/srichter-blow-services/src/zope/app/presentation/configure.zcml 2005-02-04 21:53:18 UTC (rev 29047)
@@ -82,6 +82,9 @@
title="zope.app.ZPTTemplate"
description="Persistent View Page Template"
/>
+ <implements
+ interface="zope.app.annotation.interfaces.IAttributeAnnotatable"
+ />
<require
permission="zope.View"
attributes="__call__"
@@ -91,9 +94,6 @@
interface=".interfaces.IZPTTemplate"
set_schema=".interfaces.IZPTTemplate"
/>
- <implements
- interface="zope.app.annotation.interfaces.IAttributeAnnotatable"
- />
</content>
<adapter
Modified: Zope3/branches/srichter-blow-services/src/zope/app/presentation/registration.py
===================================================================
--- Zope3/branches/srichter-blow-services/src/zope/app/presentation/registration.py 2005-02-04 21:52:31 UTC (rev 29046)
+++ Zope3/branches/srichter-blow-services/src/zope/app/presentation/registration.py 2005-02-04 21:53:18 UTC (rev 29047)
@@ -21,6 +21,7 @@
from zope.interface import implements, providedBy, Interface, Attribute
from zope.security.checker import NamesChecker, ProxyFactory
+from zope.security.proxy import removeSecurityProxy
import zope.component.interfaces
import zope.configuration.exceptions
@@ -46,19 +47,17 @@
# We only care about browser pages
requestType = zope.publisher.interfaces.browser.IBrowserRequest
- def __init__(self, required, name, permission,
+ def __init__(self, name, required=None, permission=None,
factoryName=None, template=None, attribute=None):
# An interface coming out of an interface widget is security
# proxied which is not pickable, thus remove the proxies here
- required = zope.proxy.removeAllProxies(required)
-
- self.required = required
+ self.required = removeSecurityProxy(required)
self.factoryName = factoryName
self.name = name
self.permission = permission
- self.template = template
+ self.template = removeSecurityProxy(template)
self.attribute = attribute
-
+
def validate(self):
if self.template and self.attribute:
raise zope.configuration.exceptions.ConfigurationError(
@@ -102,16 +101,18 @@
def PageRegistrationAddSubscriber(registration, event):
if registration.template is not None:
- dependents = IDependable(registration.template)
- objectpath = zapi.getPath(registration)
- dependents.addDependent(objectpath)
+ # XXX: Needs investigating
+ dependents = IDependable(removeSecurityProxy(registration.template))
+ #objectpath = zapi.getPath(registration)
+ #dependents.addDependent(objectpath)
def PageRegistrationRemoveSubscriber(registration, event):
if registration.template is not None:
- dependents = IDependable(registration.template)
- objectpath = zapi.getPath(registration)
- dependents.removeDependent(objectpath)
+ # XXX: Needs investigating
+ dependents = IDependable(removeSecurityProxy(registration.template))
+ #objectpath = zapi.getPath(registration)
+ #dependents.removeDependent(objectpath)
class TemplateViewFactory(object):
More information about the Zope3-Checkins
mailing list