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
ff1ce13f
Commit
ff1ce13f
authored
Feb 08, 1999
by
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
*** empty log message ***
parent
5870471e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
30 deletions
+7
-30
lib/python/OFS/DTMLDocument.py
lib/python/OFS/DTMLDocument.py
+3
-28
lib/python/OFS/Image.py
lib/python/OFS/Image.py
+4
-2
No files found.
lib/python/OFS/DTMLDocument.py
View file @
ff1ce13f
...
...
@@ -102,7 +102,7 @@
##############################################################################
"""DTML Document objects."""
__version__
=
'$Revision: 1.
4
$'
[
11
:
-
2
]
__version__
=
'$Revision: 1.
5
$'
[
11
:
-
2
]
from
DocumentTemplate.DT_Util
import
InstanceDict
,
TemplateDict
from
ZPublisher.Converters
import
type_converters
from
Globals
import
HTML
,
HTMLFile
,
MessageDialog
...
...
@@ -218,41 +218,16 @@ class DTMLDocument(DTMLMethod, PropertyManager):
Response, and key word arguments."""
kw
[
'document_id'
]
=
self
.
id
kw
[
'document_title'
]
=
self
.
title
if
client
is
None
:
# Called as subtemplate, so don't need error propigation!
#__traceback_info__=(`self.__name__`, `self`, `self.aq_parent`)
r
=
apply
(
HTML
.
__call__
,
(
self
,
self
,
REQUEST
),
kw
)
# try:
# md=REQUEST
# md._push(InstanceDict(self.aq_parent, md))
# md._push(InstanceDict(self, md))
# r=apply(HTML.__call__, (self, self, REQUEST), kw)
# finally:
# md._pop(1)
r
=
apply
(
HTML
.
__call__
,
(
self
,
client
,
REQUEST
),
kw
)
if
RESPONSE
is
None
:
return
r
return
decapitate
(
r
,
RESPONSE
)
## md=TemplateDict()
## push=md._push
## globals=self.globals
## shared_globals=self.shared_globals
## mapping=REQUEST
## if shared_globals: push(shared_globals)
## if globals: push(globals)
## if mapping: push(mapping)
## push(InstanceDict(client, md))
## if hasattr(mapping, 'AUTHENTICATED_USER'):
## md.AUTHENTICATED_USER=mapping['AUTHENTICATED_USER']
## md.validate=self.validate
## md.this=self
try
:
r
=
apply
(
HTML
.
__call__
,
(
self
,
self
,
REQUEST
),
kw
)
try
:
r
=
apply
(
HTML
.
__call__
,
(
self
,
(
client
,
self
),
REQUEST
),
kw
)
except
:
if
self
.
id
()
==
'standard_error_message'
:
raise
sys
.
exc_type
,
sys
.
exc_value
,
sys
.
exc_traceback
return
self
.
raise_standardErrorMessage
(
client
,
REQUEST
)
if
RESPONSE
is
None
:
return
r
return
decapitate
(
r
,
RESPONSE
)
...
...
lib/python/OFS/Image.py
View file @
ff1ce13f
...
...
@@ -102,7 +102,7 @@
##############################################################################
"""Image object"""
__version__
=
'$Revision: 1.5
3
$'
[
11
:
-
2
]
__version__
=
'$Revision: 1.5
4
$'
[
11
:
-
2
]
import
Globals
,
string
,
struct
,
mimetypes
,
content_types
from
Globals
import
HTMLFile
,
MessageDialog
...
...
@@ -196,9 +196,11 @@ class File(Persistent,Implicit,PropertyManager,
c
(
REQUEST
[
'PARENTS'
][
1
],
REQUEST
)
else
:
c
()
RESPONSE
[
'content-type'
]
=
self
.
content_type
RESPONSE
.
setHeader
(
'content-type'
,
self
.
content_type
)
return
self
.
data
def
view_image_or_file
(
self
,
URL1
):
"""
The default view of the contents of the File or Image.
...
...
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