[Zope] Namespace problem with folders starting with numbers

Ausum augusto@artlover.com
Fri, 11 May 2001 14:39:27 -0500


Thank you, Sean.

Yes, eventually using <dtml-with> enables me to reach the property value, by
placing a method (using your logic), at the same folder where it finds a folder
with numbers as names. That means I'd need at least three methods, but guess
this isn't a clean way of retrieving simple property values.

How does the community faces this? Do you just don't use numbers as folder
names?



Ausum



sean.upton@uniontrib.com wrote:
> 
> Ok.  Sorry to jump to quickly on that one; I am partially wrong.
> 
> <dmtl-var expr="_['2000'].id"> will work; so will <dtml-in
> expr="_['2000'].objectValues()"> (returns a sequence).
> 
> However, in the case of something like this:
> <dtml-var expr="_['5000']._['5100'].id">
> 
> Zope has some security/permissions issue with that (when I try to run a
> method with code like this as a manager, I get a basic auth box?).  I assume
> that the workaround would have to be using dtml-with one namespace at a
> time...
> 
> That is, unless someone has a better way to do this.
> 
> Sean
> 
> -----Original Message-----
> From: Upton, Sean
> Sent: Friday, May 11, 2001 8:50 AM
> To: 'Ausum'; zope@zope.org
> Subject: RE: [Zope] Namespace problem with folders starting with numbers
> 
> use:
> 
> <dtml-var expr="folder1._['2000']...
> 
> etc to reference an object with an id; should work, though I think this only
> works in an expr within dtml-var and not name=...
> 
> Sean
> 
> -----Original Message-----
> From: Ausum [mailto:augusto@artlover.com]
> Sent: Friday, May 11, 2001 8:19 AM
> To: zope@zope.org
> Subject: [Zope] Namespace problem with folders starting with numbers
> 
> I need to retrieve a property nested at a document placed within folders
> whose
> names start with numbers. Like this:
> 
> <dtml-var "folder1.2000.12345.dtmldoc.this_property">
> 
> This sintax is invalid because there are object names that are starting with
> numbers, within the Python expression.
> 
> Is there a workaround? (I've tried the usual ones, unsuccessfully).
> 
> Ausum
> 
> _______________________________________________
> 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 )
> 
> _______________________________________________
> 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 )