call the python script class PythonScript; try to handle unicode correctly
git-svn-id: svn://svn.cy55.de/Zope3/src/cybertools/trunk@1870 fd906abe-77d9-0310-91a1-e0d9ade77398
This commit is contained in:
parent
0af3bb6512
commit
01935abab7
2 changed files with 7 additions and 7 deletions
|
@ -11,7 +11,7 @@
|
|||
# FOR A PARTICULAR PURPOSE.
|
||||
#
|
||||
##############################################################################
|
||||
"""Python Page Browser Views
|
||||
"""Python Script Browser Views
|
||||
|
||||
$Id$
|
||||
"""
|
||||
|
@ -24,7 +24,7 @@ class PythonScriptEval(object):
|
|||
"""Evaluate the Python Script."""
|
||||
|
||||
def index(self, **kw):
|
||||
"""Call a Python Page"""
|
||||
"""Call a Python Script"""
|
||||
self.request.response.setHeader('content-type',
|
||||
self.context.contentType)
|
||||
result = self.context(self.request, **kw)
|
||||
|
@ -34,14 +34,14 @@ class PythonScriptEval(object):
|
|||
|
||||
|
||||
class PythonScriptEditView(EditView):
|
||||
"""Edit View Class for Python Page."""
|
||||
"""Edit View Class for Python Script."""
|
||||
|
||||
syntaxError = None
|
||||
|
||||
def update(self):
|
||||
"""Update the content with the HTML form data."""
|
||||
try:
|
||||
status = super(PythonPageEditView, self).update()
|
||||
status = super(PythonScriptEditView, self).update()
|
||||
except SyntaxError, err:
|
||||
self.syntaxError = err
|
||||
status = _('A syntax error occurred.')
|
||||
|
|
|
@ -48,8 +48,8 @@
|
|||
|
||||
<browser:addMenuItem
|
||||
class=".script.PythonScript"
|
||||
title="Python Page"
|
||||
description="An Python Page"
|
||||
title="Python Script"
|
||||
description="An Python Script"
|
||||
permission="zope.ManageContent"
|
||||
view="AddPythonScript.html"
|
||||
/>
|
||||
|
@ -58,7 +58,7 @@
|
|||
for=".interfaces.IPythonScript"
|
||||
schema=".interfaces.IPythonScript"
|
||||
name="edit.html"
|
||||
label="Edit Python Page"
|
||||
label="Edit Python Script"
|
||||
class=".browser.PythonScriptEditView"
|
||||
template="edit.pt"
|
||||
permission="zope.ManageContent"
|
||||
|
|
Loading…
Add table
Reference in a new issue