[Zope-Checkins] CVS: Zope3/lib/python/Zope/App/OFS/Content/Folder/Views/XUL - Main.py:1.1.4.2 SetLimit.py:1.1.4.2 Tree.py:1.1.4.2
Jim Fulton
jim@zope.com
Thu, 23 May 2002 14:01:43 -0400
Update of /cvs-repository/Zope3/lib/python/Zope/App/OFS/Content/Folder/Views/XUL
In directory cvs.zope.org:/tmp/cvs-serv26429/lib/python/Zope/App/OFS/Content/Folder/Views/XUL
Modified Files:
Tag: Zope-3x-branch
Main.py SetLimit.py Tree.py
Log Message:
This all started with wanting to be able to use url;view in a ZPT path. :)
That lead me to:
- Massive traversal refactoring.
Namespace handling is now centralized in Zope.App.Traversing.
- ZPT refactoring, including some renaming that touches pretty much everything. :)
- The application specific ZPT support was moved into
Zope.App.PageTemplate.
- To get page template files (for use in views):
from Zope.App.PageTemplate import ViewPageTemplateFile
- Fixed up security so that ZPT expressions only have access to
safe builtins and so that modules namespace does imports safely.
- Got ZPTPage working!
- renaming url to absolute_url and got absolute_url to work in paths.
- Cleaned up the (as yet unused) RestrictedInterpreter module in
Zope.Security. In particular, changed to use a separate
RestrictedBuiltins module.
=== Zope3/lib/python/Zope/App/OFS/Content/Folder/Views/XUL/Main.py 1.1.4.1 => 1.1.4.2 ===
#
##############################################################################
-"""
-
+"""
+
$Id$
-"""
+"""
+
+
+from Zope.App.PageTemplate import ViewPageTemplateFile
+from Zope.Publisher.Browser.AttributePublisher import AttributePublisher
+from Zope.App.OFS.IContainer import IReadContainer
+
+class Main(AttributePublisher):
+ """ """
+
+ __implements__ = AttributePublisher.__implements__
+
+
+ def __init__(self, context):
+ """Initialize form.
+ """
+ self._context = context
+
+
+ def getContext(self):
+ """ """
+ return self._context
+
+
+ index = ViewPageTemplateFile('main.pt')
+ menu = ViewPageTemplateFile('menu.pt')
-
-from Zope.PageTemplate.PageTemplateFile import PageTemplateFile
-from Zope.Publisher.Browser.AttributePublisher import AttributePublisher
-from Zope.App.OFS.IContainer import IReadContainer
-
-class Main(AttributePublisher):
- """ """
-
- __implements__ = AttributePublisher.__implements__
-
-
- def __init__(self, context):
- """Initialize form.
- """
- self._context = context
-
-
- def getContext(self):
- """ """
- return self._context
-
-
- index = PageTemplateFile('main.pt')
- menu = PageTemplateFile('menu.pt')
-
=== Zope3/lib/python/Zope/App/OFS/Content/Folder/Views/XUL/SetLimit.py 1.1.4.1 => 1.1.4.2 ===
from Zope.App.Formulator.Form import Form
-from Zope.PageTemplate.PageTemplateFile import PageTemplateFile
+from Zope.App.PageTemplate import ViewPageTemplateFile
class SetLimit(Form):
@@ -30,8 +30,8 @@
_fieldViewNames = ['XULLimitFieldView']
- template = PageTemplateFile('limit.pt')
- action_js = PageTemplateFile('action.pt')
+ template = ViewPageTemplateFile('limit.pt')
+ action_js = ViewPageTemplateFile('action.pt')
def action(self, limit):
''' '''
=== Zope3/lib/python/Zope/App/OFS/Content/Folder/Views/XUL/Tree.py 1.1.4.1 => 1.1.4.2 ===
-from Zope.PageTemplate.PageTemplateFile import PageTemplateFile
+from Zope.App.PageTemplate import ViewPageTemplateFiley
from Zope.Publisher.Browser.AttributePublisher import AttributePublisher
from Zope.App.OFS.IContainer import IReadContainer