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
bab0ec54
Commit
bab0ec54
authored
May 14, 2004
by
Andreas Jung
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Taking default encodings from the reStructuredText module
parent
59c30ca0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
12 deletions
+12
-12
lib/python/Products/ZReST/ZReST.py
lib/python/Products/ZReST/ZReST.py
+12
-12
No files found.
lib/python/Products/ZReST/ZReST.py
View file @
bab0ec54
#
# $Id: ZReST.py,v 1.
10 2003/11/28 16:46:28 jim
Exp $
# $Id: ZReST.py,v 1.
6.12.6 2004/05/14 16:54:57 andreasjung
Exp $
#
''' ReStructuredText Product for Zope
...
...
@@ -22,11 +22,6 @@ from App.config import getConfiguration
import
sys
modulesecurity
=
ModuleSecurityInfo
()
default_enc
=
sys
.
getdefaultencoding
()
default_output_encoding
=
getConfiguration
().
rest_output_encoding
or
default_enc
default_input_encoding
=
getConfiguration
().
rest_input_encoding
or
default_enc
modulesecurity
.
declareProtected
(
'View management screens'
,
'manage_addZReSTForm'
)
manage_addZReSTForm
=
DTMLFile
(
'dtml/manage_addZReSTForm'
,
globals
())
...
...
@@ -53,23 +48,28 @@ class ZReST(Item, PropertyManager, Historical, Implicit, Persistent):
meta_type
=
'ReStructuredText Document'
security
=
ClassSecurityInfo
()
def
__init__
(
self
,
id
,
output_encoding
=
default_output_encoding
,
input_encoding
=
default_input_encoding
):
def
__init__
(
self
,
id
,
output_encoding
=
None
,
input_encoding
=
None
):
self
.
id
=
id
self
.
title
=
id
self
.
stylesheet
=
'default.css'
self
.
report_level
=
'2'
self
.
source
=
self
.
formatted
=
''
self
.
input_encoding
=
input_encoding
self
.
output_encoding
=
output_encoding
from
reStructuredText
import
default_output_encoding
,
\
default_input_encoding
self
.
input_encoding
=
input_encoding
or
\
default_input_encoding
self
.
output_encoding
=
output_encoding
or
\
default_output_encoding
# define the properties that define this object
_properties
=
(
{
'id'
:
'stylesheet'
,
'type'
:
'string'
,
'mode'
:
'w'
,
'default'
:
'default.css'
},
{
'id'
:
'report_level'
,
'type'
:
'string'
,
'mode'
:
'w'
,
'default'
:
'2'
},
{
'id'
:
'input_encoding'
,
'type'
:
'string'
,
'mode'
:
'w'
,
'default'
:
default_input_encoding
},
{
'id'
:
'output_encoding'
,
'type'
:
'string'
,
'mode'
:
'w'
,
'default'
:
default_output_encoding
},
{
'id'
:
'input_encoding'
,
'type'
:
'string'
,
'mode'
:
'w'
,
'default'
:
'iso-8859-15'
},
{
'id'
:
'output_encoding'
,
'type'
:
'string'
,
'mode'
:
'w'
,
'default'
:
'iso-8859-15'
},
)
property_extensible_schema__
=
0
...
...
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