[Zope] [python script] problem with AUTHENTICATED_USER

2005-04-20 Thread BonviciniJ
I have problem with my python script. I want to check if a user has a the manager role, and add an option in a menu in this case Here is my script: for el in rep.objectValues('Folder'): if el.id==Administration and AUTHENTICATED_USER.has_role(self, [Manager]):

[Zope] [python script] problem with AUTHENTICATED_USER

2005-04-20 Thread BonviciniJ
I have another problem (not in relation with AUTHENTICATED_USER): I would like to know if a special function exists to transform special char in html (like HTMLentities in PHP or escape in javascript) ___ Zope maillist - Zope@zope.org

[Zope] [Zope/DTML] accessing PARENTS url with dtml tag ???

2005-04-15 Thread BonviciniJ
I have found a similar problem at this url: http://mail.zope.org/pipermail/zope/2000-August/115809.html I want to do the same a Kapil, but in DTML. I tried different solutions: 1)dtml-with PARENTS[0]dtml-var absolute_url/dtml-with 2)dtml-var PARENTS[0].absolute_url() but I still have the

Re:[Zope] [Zope/DTML] accessing PARENTS url with dtml tag ???

2005-04-15 Thread BonviciniJ
thanks a lot for your help, it works perfectly -original message-- Try this construction: dtml-with expr=aq_parentObject: dtml-var title_or_id url: dtml-var absolute_url/dtml-with Cliff BonviciniJ at keops.net http://mail.zope.org/mailman/listinfo/zope wrote: I have found a similar

[Zope] how to expand a branch using dtml-tree ?

2005-04-11 Thread BonviciniJ
I would like to know if its possible to expand a specified branch of a tree,using the dtml-tree tags. I use this tag to display the tree of my site: dtml-tree expr=Ebullition.pages nowrap=true single=1 skip_unauthorized A HREF=dtml-var absolute_urldtml-var title_or_id/A

[Zope] Zope/python: downloading images from the web and add them to Zope

2005-04-08 Thread BonviciniJ
I would like to know how to add image file from an URL. I created a form with to pissibilities: add an image from a local file , and a image from an url here is my form: input type=radio name=sourcePicture checked onClick=lock_option() value=file get from disk: input type=file name=pict_file