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
706b9dfe
Commit
706b9dfe
authored
Feb 02, 2003
by
Andreas Jung
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
the content-type header is now set with the corresponding encoding parameter
parent
af7f7199
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
+7
-3
lib/python/Products/ZReST/ZReST.py
lib/python/Products/ZReST/ZReST.py
+7
-3
No files found.
lib/python/Products/ZReST/ZReST.py
View file @
706b9dfe
#
# $Id: ZReST.py,v 1.
3 2003/02/01 10:23:10
andreasjung Exp $
# $Id: ZReST.py,v 1.
4 2003/02/02 14:21:51
andreasjung Exp $
#
''' ReStructuredText Product for Zope
...
...
@@ -80,13 +80,14 @@ class ZReST(Item, PropertyManager, Historical, Implicit, Persistent):
def
index_html
(
self
,
REQUEST
=
None
):
''' Getting the formatted text
'''
REQUEST
.
RESPONSE
.
setHeader
(
'content-type'
,
'text/html
'
)
REQUEST
.
RESPONSE
.
setHeader
(
'content-type'
,
'text/html
; charset: %s'
%
self
.
output_encoding
)
return
self
.
formatted
security
.
declareProtected
(
'View'
,
'source_txt'
)
def
source_txt
(
self
,
REQUEST
=
None
):
''' Getting the source text
'''
REQUEST
.
RESPONSE
.
setHeader
(
'content-type'
,
'text/plain
'
)
REQUEST
.
RESPONSE
.
setHeader
(
'content-type'
,
'text/plain
; charset: %s'
%
self
.
input_encoding
)
return
self
.
source
# edit form, which is also the primary interface
...
...
@@ -270,6 +271,9 @@ modulesecurity.apply(globals())
#
# $Log: ZReST.py,v $
# Revision 1.4 2003/02/02 14:21:51 andreasjung
# the content-type header is now set with the corresponding encoding parameter
#
# Revision 1.3 2003/02/01 10:23:10 andreasjung
# input/output_encoding are now properties making ZReST more configurable
#
...
...
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