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
44efe88b
Commit
44efe88b
authored
Dec 01, 1999
by
Jim Fulton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed a bug in handling the new 'url' option.
parent
31f00714
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
5 deletions
+9
-5
lib/python/DocumentTemplate/DT_Var.py
lib/python/DocumentTemplate/DT_Var.py
+9
-5
No files found.
lib/python/DocumentTemplate/DT_Var.py
View file @
44efe88b
...
...
@@ -217,8 +217,8 @@ Evaluating expressions without rendering results
'''
# '
__rcs_id__
=
'$Id: DT_Var.py,v 1.3
4 1999/11/04 20:29:04 petrilli
Exp $'
__version__
=
'$Revision: 1.3
4
$'
[
11
:
-
2
]
__rcs_id__
=
'$Id: DT_Var.py,v 1.3
5 1999/12/01 23:48:56 jim
Exp $'
__version__
=
'$Revision: 1.3
5
$'
[
11
:
-
2
]
from
DT_Util
import
parse_params
,
name_param
,
html_quote
,
str
import
regex
,
string
,
sys
,
regex
...
...
@@ -264,14 +264,19 @@ class Var:
if
val
is
None
:
if
md
.
has_key
(
name
):
val
=
md
[
name
]
if
have_arg
(
'url'
):
val
=
md
.
getitem
(
name
,
0
)
val
=
val
.
absolute_url
()
else
:
val
=
md
[
name
]
else
:
if
have_arg
(
'missing'
):
return
args
[
'missing'
]
else
:
raise
KeyError
raise
KeyError
,
name
else
:
val
=
val
.
eval
(
md
)
if
have_arg
(
'url'
):
val
=
val
.
absolute_url
()
__traceback_info__
=
name
,
val
,
args
...
...
@@ -279,7 +284,6 @@ class Var:
# Treat None as special case wrt null
return
args
[
'null'
]
if
have_arg
(
'url'
):
val
=
val
.
absolute_url
()
# handle special formats defined using fmt= first
if
have_arg
(
'fmt'
):
...
...
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