[Zope-DB] Z Psycopg and date fields
Charlie Clark
charlie@begeistert.org
Thu, 24 Apr 2003 09:55:36 +0200
On 2003-04-24 at 02:52:01 [+0200], Kevin Chambers wrote:
> Hi there--
>
> Zope 2.6 on Debian Testing (Sarge)
>
> I'm struggling with formatting date fields coming from my PostgreSQL DB.
>
> By default the database connection uses mxDateTime, which not a standard
> permitted zope library. To get mxDateTime I tried entering the following
> __init__.py in a folder in the products directory, but it doesn't stop me
> from getting "You are not allowed to access date in this context" message:
>
> ____________________________________________________
> Products.PythonScripts.Utility import allow_module allow_module("time")
> ____________________________________________________
>
>
> I also tried allow_module("mxDateTime") and allow_module("mxdatetime")
>
>
> Psycopg has the option to use the Zope DateTime module, which I'd be fine
> with, except that I get a:
>
> Error Type: AttributeError
> Error Value: _year
>
> when there are nulls.
>
> Can anyone help?
Yes, upgrade to the newest mxDateTime if MAL has released it. It fixes the
security problem which you noted.
Charlie