[Zope] Nested ZSQL methods

Marcus Collins mcollins@sunesi.com
Thu, 6 Apr 2000 12:21:50 +0200


Perhaps details() returns a column called 'author'?

Just a guess.

hth,

-- Marcus

> -----Original Message-----
> From: Tony McDonald [mailto:tony.mcdonald@ncl.ac.uk]
> Sent: 06 April 2000 12:09
> To: Zope List
> Subject: [Zope] Nested ZSQL methods
> 
> 
> Hi,
> I *thought* I was getting Zenned up. Maybe not :(
> 
> I have two ZSQL methods in the same folder called 'LTSN', 'details' 
> and 'author', where output from 'details' is used to query 'author' 
> for information, ie
> 
> <dtml-in "details(new_id=tst_id)">
> <dtml-in "author(code=Contact_Shortcode)">
> <dtml-var Firstname> <dtml-var Surname><br>
> </dtml-in>
> </dtml-in>
> 
> This gives a TypeError.
> 
> Traceback (innermost last):
>    File /home/MEDFAC_SERVER/lib/python/ZPublisher/Publish.py, line 
> 165, in publish
>    File /home/MEDFAC_SERVER/lib/python/ZPublisher/mapply.py, 
> line 160, in mapply
>      (Object: more)
>    File /home/MEDFAC_SERVER/lib/python/ZPublisher/Publish.py, line 
> 102, in call_object
>      (Object: more)
>    File /home/MEDFAC_SERVER/lib/python/OFS/DTMLDocument.py, line 166, 
> in __call__
>      (Object: more)
>    File /home/MEDFAC_SERVER/lib/python/DocumentTemplate/DT_String.py, 
> line 502, in __call__
>      (Object: more)
>    File 
> /home/MEDFAC_SERVER/lib/python/DocumentTemplate/DT_In.py, line 
> 691, in renderwob
>      (Object: details(new_id=tst_id))
>    File 
> /home/MEDFAC_SERVER/lib/python/DocumentTemplate/DT_In.py, line 
> 633, in renderwob
>      (Object: author(code=Contact_Shortcode))
>    File /home/MEDFAC_SERVER/lib/python/DocumentTemplate/DT_Util.py, 
> line 335, in eval
>      (Object: author(code=Contact_Shortcode))
>      (Info: Contact_Shortcode)
>    File <string>, line 0, in ?
> TypeError: call of non-function (type string)
> 
> Thing is, that this code works fine.
> 
> <dtml-in "details(new_id=tst_id)">
> <dtml-in "LTSN.author(code=Contact_Shortcode)">
> <dtml-var Firstname> <dtml-var Surname><br>
> </dtml-in>
> </dtml-in>
> 
> Can anyone enlighten me here? This is baffling...
> 
> cheers
> tone.
> ------
> Dr Tony McDonald,  FMCC, Networked Learning Environments Project 
> http://nle.ncl.ac.uk/
> The Medical School, Newcastle University Tel: +44 191 222 5888
> Fingerprint: 3450 876D FA41 B926 D3DD  F8C3 F2D0 C3B9 8B38 18A2
> 
> _______________________________________________
> Zope maillist  -  Zope@zope.org
> http://lists.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists - 
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope-dev )
>