Hello, It seems that valid characters for zope id's are only : chars, numbers, "," "." and spaces. I'm wondering how I can store emails adress as valid zope object id's. I'd like to setup a simple list of emails stored as dtml docs with the emails as id. as "@" are invalid characters for zope id, I currently have no other solution than replacing those with "," which is not totally nice imho ;-) (i tried using "%40" but it's invalid too) Does anyone have an idea for my little problem ? Thanks Philippe
Hi Phillippe, you could just use the msg-ID as id and the e-mail-address as a property? Regards Tino --On Dienstag, 3. Juli 2001 16:04 +0200 Philippe Jadin <philippe@123piano.com> wrote:
Hello,
It seems that valid characters for zope id's are only : chars, numbers, "," "." and spaces.
I'm wondering how I can store emails adress as valid zope object id's.
I'd like to setup a simple list of emails stored as dtml docs with the emails as id.
as "@" are invalid characters for zope id, I currently have no other solution than replacing those with "," which is not totally nice imho ;-) (i tried using "%40" but it's invalid too)
Does anyone have an idea for my little problem ?
Thanks
Philippe
_______________________________________________ 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 )
You can use characters,numbers, dash, underscore, tilde, dot, comma and spaces inside a object ID (see ObjectManager.py/bad_id). You can *try* to add some additional characters you need but this *may* have side effects on other Zope components...so take care. Andreas ----- Original Message ----- From: "Philippe Jadin" <philippe@123piano.com> To: <zope@zope.org> Sent: Tuesday, July 03, 2001 9:04 AM Subject: [Zope] "@" in object id's : invalid
Hello,
It seems that valid characters for zope id's are only : chars, numbers, "," "." and spaces.
I'm wondering how I can store emails adress as valid zope object id's.
I'd like to setup a simple list of emails stored as dtml docs with the emails as id.
as "@" are invalid characters for zope id, I currently have no other solution than replacing those with "," which is not totally nice imho ;-) (i tried using "%40" but it's invalid too)
Does anyone have an idea for my little problem ?
Thanks
Philippe
_______________________________________________ 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 )
On Tue, Jul 03, 2001 at 04:04:47PM +0200, Philippe Jadin wrote:
I'd like to setup a simple list of emails stored as dtml docs with the emails as id.
My solution may be (ok, is) ugly, but it worked for us (we wanted a ZClass with the emails as id, but otherwise the problem was the same). We ended up naming all the ids email__AT__domain.name, and replaced the __AT__ with an @ symbol whenever we needed to render it in a page. Something like: <dtml-call "REQUEST.set('email',restore_at_in_email(text=id))"> in the page to be rendered, where restore_at_in_email was an acquired DTML method with the content: <dtml-var expr="_.string.replace(text,'__AT__','@')"> We have a corresponding method replace_at_in_email with the content: <dtml-var expr="_.string.replace(text,'@','__AT__')"> I think we used replace_at_in_email in the constructor code for the ZClass; I didn't see it in my quick scan through the ZODB-stored code. Feel free to comment on how this can be made cleaner. -- Mike Renfro / R&D Engineer, Center for Manufacturing Research, 931 372-3601 / Tennessee Technological University -- renfro@tntech.edu
participants (4)
-
Andreas Jung -
Mike Renfro -
Philippe Jadin -
Tino Wildenhain