[Zope] on dates
massimop at users.berlios.de
massimop at users.berlios.de
Mon Oct 11 14:57:28 EDT 2004
On Mon, 2004-10-11 at 20:41 +0200, Tino Wildenhain wrote:
> Hi,
>
> Am Mo, den 11.10.2004 schrieb massimop at users.berlios.de um 20:13:
> > On Mon, 2004-10-11 at 18:57 +0100, Cliff Ford wrote:
> > > You could try writing a wee Python script. This one gets the date from
> > > the query:
> ...
> > ## Script (Python) "formatdate_py"
> > ##bind container=container
> > ##bind context=context
> > ##bind namespace=
> > ##bind script=script
> > ##bind subpath=traverse_subpath
> > ##parameters=d
> > ##title=
> > ##
> > # Import a standard function, and get the HTML request and response
> > objects.
> > from Products.PythonScripts.standard import html_quote
> > request = container.REQUEST
> > RESPONSE = request.RESPONSE
> >
> > return d.day
> ^^^^
> you have to call it anyway. E.g. d.day()
ok
anyway it makes no difference in this case
I mean, same error
>
>
> > and then called it from a page template with:
> >
> > <i tal:content="python: here.formatdate_py(item.data)"></i>
> >
> > but it's sadly the same...
> >
> > <<You are not allowed to access 'day' in this context>>
> >
> > and it dosn't change if I pass 'item' to the script an access the field
> > 'data' inside it
>
> Looks a bit like the database adaptor you use has a bug here.
> Or did you perhaps screw up on permissions a bit?
no wonder if it's the case, but where? I can't imagine....
>
> Regards
> Tino
thanks
massimo
More information about the Zope
mailing list