On 30 August 2010 19:46, Maurits van Rees <maur...@vanrees.org> wrote: > Op 29-08-10 07:24, Martin Aspeli schreef: >> plone.uuid provides a simple API for generating and accessing UUIDs. > > If we use this to create uuids for non-content items, that cannot be > traversed to, would that give any problems?
No, although the helper function that gets you a (content) item from a UUID looks in portal_catalog, so you'd need a different mechanism if you needed that kind of central lookup. The UUIDs will never clash, though. > For example, it might be nice to use this to create the secrets that the > password reset tool sends out, or secrets used in a newsletter product. > I had a few ideas some months back that may or may not ever get > implemented. ;-) For this, uuid.uuid4() is probably fine. What plone.uuid adds is a (tiny) standard API for looking up a UUID for an object. If you had a "newsletter" object and you wanted its UUID you could write an IUUID() adapter for it. > I'd guess that, as long as such a non-content item with a uuid does not > end up in the portal_catalog, there is no way to accidentally try to > traverse to such non-content. Of course not. Martin _______________________________________________ Framework-Team mailing list Framework-Team@lists.plone.org http://lists.plone.org/mailman/listinfo/framework-team