[Zope] quoting id values
Ross J. Reedstrom
reedstrm@rice.edu
Fri, 14 May 1999 14:00:21 -0500
Hey Zopists:
I'm making a little tiny File Upload/Exchange site with Zope, and I've
run into a liitle problem. I'd like to keep track of who uploads what,
so I'm trying to set
a property on each file equivalent to the AUTHENTICATED_USER. So,
stealing from the 'Creating Folders' example, I've got this code:
<!--#if "REQUEST['id'] in objectIds()"-->
<H4>Sorry! That name exists, try again</H4>
<!--#else-->
<!--#call
"manage_addFile(id=REQUEST['id'],title=REQUEST['title'],file=REQUEST['file'])"-->
<!--#call "_.getitem(REQUEST['id']).manage_addProperty(
'addedby',REQUEST['AUTHENTICATED_USER'],
'string')"-->
<H3>File Added</H3>
<!--#/if-->
This works fine for adding files, but the manage_addProperty call bombs
out if the 'id' has a dot in it. The manage_addFile method handles that
fine - apparently it quotes the id sufficently, since it gets added if I
comment out the addProperty part. If I set an id that does not contain a
dot, everthing works.
Any ideas?
Ross
--
Ross J. Reedstrom, Ph.D., <reedstrm@rice.edu>
NSBRI Research Scientist/Programmer
Computer and Information Technology Institute
Rice University, 6100 S. Main St., Houston, TX 77005