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
1d8df798
Commit
1d8df798
authored
Nov 01, 2006
by
Tres Seaver
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Forward-port fix for #2213 from 2.10 branch.
parent
813e1fc8
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
4 deletions
+15
-4
doc/CHANGES.txt
doc/CHANGES.txt
+4
-2
lib/python/Products/PageTemplates/ZopePageTemplate.py
lib/python/Products/PageTemplates/ZopePageTemplate.py
+1
-0
lib/python/Products/PageTemplates/tests/testZopePageTemplate.py
...thon/Products/PageTemplates/tests/testZopePageTemplate.py
+10
-2
No files found.
doc/CHANGES.txt
View file @
1d8df798
...
@@ -11,6 +11,8 @@ Zope Changes
...
@@ -11,6 +11,8 @@ Zope Changes
- Removed deprecated support for product initialization based on
- Removed deprecated support for product initialization based on
'__ac_permissions__' and 'meta_types' attributes.
'__ac_permissions__' and 'meta_types' attributes.
- Collector #2213: Can't edit "old" ZopePageTemplate instances.
- reStructuredText/ZReST: setting raw_enabled to 0 for security
- reStructuredText/ZReST: setting raw_enabled to 0 for security
reasons
reasons
...
@@ -41,8 +43,8 @@ Zope Changes
...
@@ -41,8 +43,8 @@ Zope Changes
- Collector #2209: ZTUtils module could not be used inside ZPT
- Collector #2209: ZTUtils module could not be used inside ZPT
- Collector #2208: rewriting/setting the 'charset' part of the
content-type
- Collector #2208: rewriting/setting the 'charset' part of the
HTTP header will be done only for 'text/*'
content-type
HTTP header will be done only for 'text/*'
- Call setDefaultSkin on new requests created as the result of
- Call setDefaultSkin on new requests created as the result of
ConflictError retries.
ConflictError retries.
...
...
lib/python/Products/PageTemplates/ZopePageTemplate.py
View file @
1d8df798
...
@@ -79,6 +79,7 @@ class ZopePageTemplate(Script, PageTemplate, Historical, Cacheable,
...
@@ -79,6 +79,7 @@ class ZopePageTemplate(Script, PageTemplate, Historical, Cacheable,
func_defaults = None
func_defaults = None
func_code = FuncCode((), 0)
func_code = FuncCode((), 0)
strict = False
_default_bindings = {'
name_subpath
': '
traverse_subpath
'}
_default_bindings = {'
name_subpath
': '
traverse_subpath
'}
_default_content_fn = os.path.join(package_home(globals()),
_default_content_fn = os.path.join(package_home(globals()),
...
...
lib/python/Products/PageTemplates/tests/testZopePageTemplate.py
View file @
1d8df798
...
@@ -40,7 +40,7 @@ class ZPTRegressions(unittest.TestCase):
...
@@ -40,7 +40,7 @@ class ZPTRegressions(unittest.TestCase):
self
.
assertEqual
(
pt
.
document_src
().
strip
(),
default_text
.
strip
())
self
.
assertEqual
(
pt
.
document_src
().
strip
(),
default_text
.
strip
())
def
testAddWithRequest
(
self
):
def
testAddWithRequest
(
self
):
"""Test manage_add with file"""
# Test manage_add with file
request
=
self
.
app
.
REQUEST
request
=
self
.
app
.
REQUEST
request
.
form
[
'file'
]
=
DummyFileUpload
(
filename
=
'some file'
,
request
.
form
[
'file'
]
=
DummyFileUpload
(
filename
=
'some file'
,
data
=
self
.
text
,
data
=
self
.
text
,
...
@@ -51,13 +51,21 @@ class ZPTRegressions(unittest.TestCase):
...
@@ -51,13 +51,21 @@ class ZPTRegressions(unittest.TestCase):
self
.
assertEqual
(
pt
.
document_src
(),
self
.
text
)
self
.
assertEqual
(
pt
.
document_src
(),
self
.
text
)
def
testAddWithRequestButNoFile
(
self
):
def
testAddWithRequestButNoFile
(
self
):
"""Collector #596: manage_add with text but no file"""
# Collector #596: manage_add with text but no file
request
=
self
.
app
.
REQUEST
request
=
self
.
app
.
REQUEST
self
.
_addPT
(
'pt1'
,
text
=
self
.
text
,
REQUEST
=
request
)
self
.
_addPT
(
'pt1'
,
text
=
self
.
text
,
REQUEST
=
request
)
# no object is returned when REQUEST is passed.
# no object is returned when REQUEST is passed.
pt
=
self
.
app
.
pt1
pt
=
self
.
app
.
pt1
self
.
assertEqual
(
pt
.
document_src
(),
self
.
text
)
self
.
assertEqual
(
pt
.
document_src
(),
self
.
text
)
def
test_BBB_for_strict_attribute
(
self
):
# Collector 2213: old templates don't have 'strict' attribute.
from
Products.PageTemplates.ZopePageTemplate
import
ZopePageTemplate
zpt
=
ZopePageTemplate
(
'issue_2213'
)
del
zpt
.
strict
# simulate old templates
self
.
assertEqual
(
zpt
.
strict
,
False
)
class
ZPTMacros
(
zope
.
component
.
testing
.
PlacelessSetup
,
unittest
.
TestCase
):
class
ZPTMacros
(
zope
.
component
.
testing
.
PlacelessSetup
,
unittest
.
TestCase
):
def
setUp
(
self
):
def
setUp
(
self
):
...
...
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