Re: [Zope] TinyTable : filter query pb

2001-01-26 Thread Aleksander Salwa

On Fri, 26 Jan 2001, Thierry Pasquier wrote:

 usagers is a TinyTable
 
 this, is ok :
 dtml-call "REQUEST.set('usager','bruno')"
 dtml-in "usagers(ident=usager)"
 ...
 
 but, not this : why ?
 dtml-call "REQUEST.set('usager',AUTHENTICATED_USER)"
 dtml-in "usagers(ident=usager)"

Because 'bruno' is a string, while AUTHENTICATED_USER is an instance of
some class (when used in dtml-var AUTHENTICATED_USER it is automatically
converted to string - user's id in that case).
Try AUTHENTICATED_USER.getId().

[EMAIL PROTECTED], [EMAIL PROTECTED]

/--\
| `long long long' is too long for GCC |
\--/




___
Zope maillist  -  [EMAIL PROTECTED]
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 )




Re: [Zope] TinyTable : filter query pb

2001-01-26 Thread Mike Renfro

On Fri, Jan 26, 2001 at 11:39:51PM +0800, Bak @ kedai wrote:

 i think you want
 untested
 dtml-call "REQUEST.set('usager',AUTHENTICATED_USER.getUserName())"
 
 /untested

Any way we can get this included in the Zope book? There's a section
where they show using getUserName(), but this whole
"AUTHENTICATED_USER is an object, not a string" business comes up
pretty frequently.

-- 
Mike Renfro  / RD Engineer, Center for Manufacturing Research,
931 372-3601 / Tennessee Technological University -- [EMAIL PROTECTED]

___
Zope maillist  -  [EMAIL PROTECTED]
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 )