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
171402f7
Commit
171402f7
authored
Jul 08, 2003
by
Evan Simpson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Provide traceback supplements for DTML Methods and Documents.
parent
48728f92
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
28 additions
and
2 deletions
+28
-2
doc/CHANGES.txt
doc/CHANGES.txt
+2
-0
lib/python/OFS/DTMLDocument.py
lib/python/OFS/DTMLDocument.py
+3
-1
lib/python/OFS/DTMLMethod.py
lib/python/OFS/DTMLMethod.py
+3
-1
lib/python/zExceptions/TracebackSupplement.py
lib/python/zExceptions/TracebackSupplement.py
+20
-0
No files found.
doc/CHANGES.txt
View file @
171402f7
...
...
@@ -8,6 +8,8 @@ Zope Changes
Features added
- DTML Methods and Documents supply a traceback supplement when called.
- OFS: OrderSupport and OrderedFolder added. OrderSupport is a mixin class
that adds the IOrderedContainer interface to ObjectManagers.
OrderedFolder - meta_type 'Folder (Ordered)' - is a new Folder class
...
...
lib/python/OFS/DTMLDocument.py
View file @
171402f7
...
...
@@ -12,7 +12,7 @@
##############################################################################
"""DTML Document objects."""
__version__
=
'$Revision: 1.
49
$'
[
11
:
-
2
]
__version__
=
'$Revision: 1.
50
$'
[
11
:
-
2
]
from
ZPublisher.Converters
import
type_converters
from
Globals
import
HTML
,
DTMLFile
,
MessageDialog
...
...
@@ -26,6 +26,7 @@ from sgmllib import SGMLParser
from
urllib
import
quote
import
Globals
from
AccessControl
import
getSecurityManager
from
zExceptions.TracebackSupplement
import
PathTracebackSupplement
done
=
'done'
...
...
@@ -109,6 +110,7 @@ class DTMLDocument(PropertyManager, DTMLMethod):
# Return cached results.
return
data
__traceback_supplement__
=
(
PathTracebackSupplement
,
self
)
kw
[
'document_id'
]
=
self
.
getId
()
kw
[
'document_title'
]
=
self
.
title
if
hasattr
(
self
,
'aq_explicit'
):
...
...
lib/python/OFS/DTMLMethod.py
View file @
171402f7
...
...
@@ -12,7 +12,7 @@
##############################################################################
"""DTML Method objects."""
__version__
=
'$Revision: 1.8
1
$'
[
11
:
-
2
]
__version__
=
'$Revision: 1.8
2
$'
[
11
:
-
2
]
import
History
from
Globals
import
HTML
,
DTMLFile
,
MessageDialog
...
...
@@ -30,6 +30,7 @@ import Globals, sys, Acquisition
from
AccessControl
import
getSecurityManager
from
AccessControl.DTML
import
RestrictedDTML
from
Cache
import
Cacheable
from
zExceptions.TracebackSupplement
import
PathTracebackSupplement
_marker
=
[]
# Create a new marker object.
...
...
@@ -102,6 +103,7 @@ class DTMLMethod(RestrictedDTML, HTML, Acquisition.Implicit, RoleManager,
# Return cached results.
return
data
__traceback_supplement__
=
(
PathTracebackSupplement
,
self
)
kw
[
'document_id'
]
=
self
.
getId
()
kw
[
'document_title'
]
=
self
.
title
...
...
lib/python/zExceptions/TracebackSupplement.py
0 → 100644
View file @
171402f7
# Stock __traceback_supplement__ implementations
class
PathTracebackSupplement
:
"""Implementation of ITracebackSupplement"""
pp
=
None
def
__init__
(
self
,
object
):
self
.
object
=
object
if
hasattr
(
object
,
'getPhysicalPath'
):
self
.
pp
=
'/'
.
join
(
object
.
getPhysicalPath
())
if
hasattr
(
object
,
'absolute_url'
):
self
.
source_url
=
'%s/manage_main'
%
object
.
absolute_url
()
def
getInfo
(
self
,
as_html
=
0
):
if
self
.
pp
is
None
:
return
if
as_html
:
from
cgi
import
escape
return
'<b>Physical Path:</b>%s'
%
(
escape
(
self
.
pp
))
else
:
return
' - Physical Path: %s'
%
self
.
pp
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