Message1549
In "Customizing Roundup/Adding a time log to your
issues" - point 4:
The function "totalTimeSpent" in this example takes
one argument, but I think it will be called with two -
with an instance of TemplatingUtils as the first
argument, and then the original argument from the
example code.
I did't run this code, but have a similar situation.
This is a part of an "extension" script (Taken from
wiki LinkFormattingExample and converted to 0.8.0
following the said example):
...
def localReplace(*args):
print "ARGS:", args
message = args[1]
return CustomTags().replace(message)
def init(tracker):
tracker.registerUtil('localReplace', localReplace)
This extension is then used in the page like this:
<pre tal:content="structure python:utils.
localReplace(msg.content.hyperlinked())">content</
pre>
And it prints on the console:
ARGS: (
<roundup.cgi.templating.TemplatingUtils instance
at 0x0105FA30>,
'This is a change note.'
)
So I guess the signature of the original function in
the example should be:
def totalTimeSpent(utils, times):
while now it is:
def totalTimeSpent(times):
|
|
Date |
User |
Action |
Args |
2009-02-03 14:21:02 | admin | link | issue1081981 messages |
2009-02-03 14:21:02 | admin | create | |
|