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
336a4b28
Commit
336a4b28
authored
Dec 08, 2000
by
Evan Simpson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change default name bindings for container and script
parent
99489705
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
18 deletions
+18
-18
lib/python/Products/PythonScripts/Bindings.py
lib/python/Products/PythonScripts/Bindings.py
+3
-3
lib/python/Products/PythonScripts/www/scriptBindings.dtml
lib/python/Products/PythonScripts/www/scriptBindings.dtml
+15
-15
No files found.
lib/python/Products/PythonScripts/Bindings.py
View file @
336a4b28
...
@@ -83,7 +83,7 @@
...
@@ -83,7 +83,7 @@
#
#
##############################################################################
##############################################################################
__version__
=
'$Revision: 1.
1
$'
[
11
:
-
2
]
__version__
=
'$Revision: 1.
2
$'
[
11
:
-
2
]
import
Globals
import
Globals
from
Globals
import
Persistent
,
HTMLFile
,
package_home
from
Globals
import
Persistent
,
HTMLFile
,
package_home
...
@@ -95,8 +95,8 @@ import os
...
@@ -95,8 +95,8 @@ import os
_www
=
os
.
path
.
join
(
package_home
(
globals
()),
'www'
)
_www
=
os
.
path
.
join
(
package_home
(
globals
()),
'www'
)
defaultBindings
=
{
'name_context'
:
'context'
,
defaultBindings
=
{
'name_context'
:
'context'
,
'name_container'
:
'
self
'
,
'name_container'
:
'
container
'
,
'name_m_self'
:
'
m_self
'
,
'name_m_self'
:
'
script
'
,
'name_ns'
:
''
,
'name_ns'
:
''
,
'name_subpath'
:
'traverse_subpath'
}
'name_subpath'
:
'traverse_subpath'
}
...
...
lib/python/Products/PythonScripts/www/scriptBindings.dtml
View file @
336a4b28
...
@@ -15,20 +15,6 @@
...
@@ -15,20 +15,6 @@
automatically be provided under that name when the script is called.
automatically be provided under that name when the script is called.
</em></p>
</em></p>
<table
cellpadding=
"2"
>
<table
cellpadding=
"2"
>
<tr>
<th
align=
"left"
valign=
"top"
>
Container
</th>
<td
align=
"left"
valign=
"top"
nowrap
><input
type=
"text"
name=
"name_container"
value=
"<dtml-var expr="
getAssignedName
('
name_container
',
'')"
html_quote
>
">
<br>
Recommended:
<code>
self
</code>
</td><td
align=
"left"
valign=
"top"
>
This is the
<dtml-with
expr=
"aq_inner.aq_parent"
>
&dtml-meta_type;
"
&dtml.missing.html_quote-title_or_id;
"
</dtml-with>
, in which this
script is located. This doesn't change unless you move the script.
If the script is in a ZClass, the Container is the class instance.
</td>
</tr>
<tr><td>
</td></tr>
<tr>
<tr>
<th
align=
"left"
valign=
"top"
>
Context
</th>
<th
align=
"left"
valign=
"top"
>
Context
</th>
<td
align=
"left"
valign=
"top"
><input
type=
"text"
name=
"name_context"
<td
align=
"left"
valign=
"top"
><input
type=
"text"
name=
"name_context"
...
@@ -42,12 +28,26 @@
...
@@ -42,12 +28,26 @@
</td>
</td>
</tr>
</tr>
<tr><td>
</td></tr>
<tr><td>
</td></tr>
<tr>
<th
align=
"left"
valign=
"top"
>
Container
</th>
<td
align=
"left"
valign=
"top"
nowrap
><input
type=
"text"
name=
"name_container"
value=
"<dtml-var expr="
getAssignedName
('
name_container
',
'')"
html_quote
>
">
<br>
Rec:
<code>
container
</code>
</td><td
align=
"left"
valign=
"top"
>
This is the
<dtml-with
expr=
"aq_inner.aq_parent"
>
&dtml-meta_type;
"
&dtml.missing.html_quote-title_or_id;
"
</dtml-with>
, in which this
script is located. This doesn't change unless you move the script.
If the script is in a ZClass, the Container is the class instance.
</td>
</tr>
<tr><td>
</td></tr>
<tr>
<tr>
<th
align=
"left"
valign=
"top"
>
Script
</th>
<th
align=
"left"
valign=
"top"
>
Script
</th>
<td
align=
"left"
valign=
"top"
><input
type=
"text"
name=
"name_m_self"
<td
align=
"left"
valign=
"top"
><input
type=
"text"
name=
"name_m_self"
value=
"<dtml-var expr="
getAssignedName
('
name_m_self
',
'')"
html_quote
>
">
value=
"<dtml-var expr="
getAssignedName
('
name_m_self
',
'')"
html_quote
>
">
<br>
<br>
Recommended:
<code>
m_self
</code>
Recommended:
<code>
script
</code>
</td><td
align=
"left"
valign=
"top"
>
</td><td
align=
"left"
valign=
"top"
>
This is the object
"&dtml-title_or_id;"
itself.
This is the object
"&dtml-title_or_id;"
itself.
</td>
</td>
...
...
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