Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
Zope
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
Zope
Commits
51f1cb82
Commit
51f1cb82
authored
Sep 01, 2007
by
Philipp von Weitershausen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make sure that those old aq_* attributes work on browser views that only inherit
from Explicit as well.
parent
c5aa30f7
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
0 deletions
+23
-0
lib/python/Products/Five/browser/tests/aqlegacy.py
lib/python/Products/Five/browser/tests/aqlegacy.py
+7
-0
lib/python/Products/Five/browser/tests/aqlegacy.zcml
lib/python/Products/Five/browser/tests/aqlegacy.zcml
+7
-0
lib/python/Products/Five/browser/tests/aqlegacy_ftest.txt
lib/python/Products/Five/browser/tests/aqlegacy_ftest.txt
+9
-0
No files found.
lib/python/Products/Five/browser/tests/aqlegacy.py
View file @
51f1cb82
...
...
@@ -32,6 +32,13 @@ class LegacyAttributes(BrowserView):
def
__call__
(
self
):
return
repr
([
obj
for
obj
in
self
.
aq_chain
])
class
ExplicitLegacyAttributes
(
Acquisition
.
Explicit
):
"""Make sure that those old aq_* attributes work on browser views
that only inherit from Explicit as well."""
def
__call__
(
self
):
return
repr
([
obj
for
obj
in
self
.
aq_chain
])
class
LegacyTemplate
(
BrowserView
):
template
=
ViewPageTemplateFile
(
'falcon.pt'
)
...
...
lib/python/Products/Five/browser/tests/aqlegacy.zcml
View file @
51f1cb82
...
...
@@ -8,6 +8,13 @@
permission="zope.Public"
/>
<browser:page
for="*"
name="explicitattributes"
class=".aqlegacy.ExplicitLegacyAttributes"
permission="zope.Public"
/>
<browser:page
for="*"
name="template"
...
...
lib/python/Products/Five/browser/tests/aqlegacy_ftest.txt
View file @
51f1cb82
...
...
@@ -26,6 +26,15 @@ views still works (the printed output is the aq_chain of the view):
<Application at >,
<ZPublisher.BaseRequest.RequestContainer object at ...>]
The same goes for browser views that just mix in Acquisition.Explicit:
>>> browser.open('http://localhost/test_folder_1_/explicitattributes')
>>> print browser.contents
[<Products.Five.metaclass.ExplicitLegacyAttributes object at ...>,
<Folder at /test_folder_1_>,
<Application at >,
<ZPublisher.BaseRequest.RequestContainer object at ...>]
Let's do some more manual tests with the view object. But first we
must get it:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment