[Zope-Checkins] CVS: Zope/lib/python/Products/ZReST -
ZReST.py:1.6.12.6
Andreas Jung
andreas at andreas-jung.com
Fri May 14 12:54:58 EDT 2004
Update of /cvs-repository/Zope/lib/python/Products/ZReST
In directory cvs.zope.org:/tmp/cvs-serv11018/lib/python/Products/ZReST
Modified Files:
Tag: Zope-2_7-branch
ZReST.py
Log Message:
taking default encodings from the reStructuredText module
=== Zope/lib/python/Products/ZReST/ZReST.py 1.6.12.5 => 1.6.12.6 ===
--- Zope/lib/python/Products/ZReST/ZReST.py:1.6.12.5 Thu May 13 10:54:49 2004
+++ Zope/lib/python/Products/ZReST/ZReST.py Fri May 14 12:54:57 2004
@@ -22,11 +22,6 @@
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 @@
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
More information about the Zope-Checkins
mailing list