[Zope] Creating Document with random num as ID?

Craig Allen cba@mediaone.net
Sat, 17 Apr 1999 17:11:36 -0400


I guess I'll have to answer it myself.<g>

I realized I could make javascript generate a random number as part of
the request.
This doesn't solve the need for uniqueness but with a large enough range
and anticipating a low volume of requests I should be able to devise a
workaround.

If anyone can tell me how the unique randon keys could/should be
generated within Zope, that would be preferable, and I'd learn
something.

> I need to create DTML Documents with a [pseudo]unique [pseudo]random
> id.  I can create the objects okay using manage_clone, and I have a
> method that generates my "unique" "random" id, but I can't seem to
> create either:
>   a) create the object and then rename it using the random number, or
>   b) [more desirable] create the object with the random id.
> 
> Ideas?  Thanks.