On Mon, 2004-10-11 at 19:45 +0100, Cliff Ford wrote:
Just to be clear that we are on the same wavelength, do this: ok
Add a python script called test from the Add drop down list.
Type d in the Parameter List box
Put this and only this in the script textarea, replacing completely the default python script:
return DateTime(d).strftime('%H:%M, %a %d %b, %Y')
Save and test, typing 2004-10-11 in the Test Value box. It should give you the date. yes, it does...
Now, in your page template make the call look like this:
<i tal:content="python: here.test(d='2004-10-11')"></i>
Test the page template. If that works, yes
substitute the typed in date with the value that you are trying to display. If item.data is date string it should just work. If item.data is a more complex object then we are at cross purposes - but it should be because that us what MySQL stores.
this way? <i tal:content="python: here.test(d=item.data)"></i> uhm... I get Error Type: TypeError Error Value: int() argument must be a string or a number isn't funny? :)
Cliff
thanks massimo (sorry, I've accidentally answered directly... I'm getting confused:))