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
244cf9e2
Commit
244cf9e2
authored
Jul 10, 2010
by
Hanno Schlichting
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Avoid using the ``Products.PythonScripts.standard`` module inside the database manager ZMI.
parent
3fb996d4
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
9 deletions
+15
-9
doc/CHANGES.rst
doc/CHANGES.rst
+3
-0
src/App/ApplicationManager.py
src/App/ApplicationManager.py
+4
-1
src/App/www/chooseDatabase.pt
src/App/www/chooseDatabase.pt
+8
-8
No files found.
doc/CHANGES.rst
View file @
244cf9e2
...
...
@@ -22,6 +22,9 @@ Bugs Fixed
Restructuring
+++++++++++++
- Avoid using the ``Products.PythonScripts.standard`` module inside the
database manager ZMI.
- Factored out the `Products.MIMETools` and `Products.ExternalMethod` packages
into their own distributions.
...
...
src/App/ApplicationManager.py
View file @
244cf9e2
...
...
@@ -20,6 +20,7 @@ from logging import getLogger
import
os
import
sys
import
time
import
urllib
from
AccessControl.class_init
import
InitializeClass
from
AccessControl.requestmethod
import
requestmethod
...
...
@@ -109,10 +110,12 @@ class DatabaseChooser(SimpleItem):
def
__init__
(
self
,
id
):
self
.
id
=
id
def
getDatabaseNames
(
self
):
def
getDatabaseNames
(
self
,
quote
=
False
):
configuration
=
getConfiguration
()
names
=
configuration
.
dbtab
.
listDatabaseNames
()
names
.
sort
()
if
quote
:
return
[(
name
,
urllib
.
quote
(
name
))
for
name
in
names
]
return
names
def
__getitem__
(
self
,
name
):
...
...
src/App/www/chooseDatabase.pt
View file @
244cf9e2
<h1 tal:replace="structure
here
/manage_page_header" />
<h2 tal:replace="structure
here
/manage_tabs" />
<h1 tal:replace="structure
context
/manage_page_header" />
<h2 tal:replace="structure
context
/manage_tabs" />
<h3>Databases</h3>
<table tal:define="
url_quote nocall:
modules/Products/PythonScripts/standard/url_quote
">
<t
r tal:repeat="name here/getDatabaseNames">
<td tal:define="qname python: url_quote(name)
">
<table tal:define="
databases python:context.getDatabaseNames(quote=True);">
<tr tal:repeat="info databases
">
<t
d tal:define="name python: info[0];
qname python: info[1]
">
<img src="/p_/DatabaseManagement_icon"
tal:attributes="src string:${request/BASE1}/p_/DatabaseManagement_icon" />
<a tal:content="name" tal:attributes="href
string:${
here
/absolute_url}/${qname}/manage_main">Main</a>
string:${
context
/absolute_url}/${qname}/manage_main">Main</a>
</td>
</tr>
</table>
<h1 tal:replace="structure
here
/manage_page_footer" />
<h1 tal:replace="structure
context
/manage_page_footer" />
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