[Zope] Interbase and Date datatype

Michael Schulz mschulz@webgis.de
Mon, 16 Jul 2001 15:11:45 +0200


Dear List, Hi Brad,

sorry to bother you again. I tried the solution you suggested, but when trying
to access the document an authentication window appears (i am logged in as
manager) ?!? The error message shows:

---
File /usr/local/Zope-2.3.1-src/lib/python/DocumentTemplate/DT_Var.py, line 278,
in render
 (Object: _.DateTime(_['GUELTIG_VON'].tuple()))
 File /usr/local/Zope-2.3.1-src/lib/python/DocumentTemplate/DT_Util.py, line
334, in eval
 (Object: _.DateTime(_['GUELTIG_VON'].tuple()))
 (Info: _)
File <string>, line 0, in ?
File /usr/local/Zope-2.3.1-src/lib/python/DocumentTemplate/DT_Util.py, line 140,
in careful_getattr
File /usr/local/Zope-2.3.1-src/lib/python/OFS/DTMLMethod.py, line 261, in
validate
 (Object: stellengesuche_output)
File /usr/local/Zope-2.3.1-src/lib/python/AccessControl/SecurityManager.py, line
144, in validate
File /usr/local/Zope-2.3.1-src/lib/python/AccessControl/ZopeSecurityPolicy.py,
line 168, in validate
Unauthorized: tuple
---

Hmm, why i am not authorized to access the method tuple()? Any hints?

Perhaps someone coulod tell what kind of object i am dealing with, after
retrieving data from a DATE column of an interbase db? the returned object is
not a string, nor i am able to convert it into one.

Thanks, Michael


Brad Clements wrote:

> On 13 Jul 2001, at 12:33, Michael Schulz wrote:
>
> > i am using zope2.3.1, python 1.5.2 and interbase adapter gvibda096.
> >
> > I am accessing an interbase DATE type column via a zsql-method and want to
> > reformat the returned date (yyyy/mm/dd), but i can't figure out how? I
> > tried without success:
> >
> >
> > 1.) <dtml-var "_.DateTime(_['gueltig_von'])"></td>
> > Error: AttributeError
>
> <dtml-var "_.DateTime(_['gueltig_von'].tuple())" fmt="%Y/%m/%d"
>
> The .tuple() method of a Date or DateTime object returns a tuple.

--
-----------------------------------------------------------
Michael Schulz
mschulz@webgis.de                             www.webgis.de