Hi Radekm On Monday, December 8, 2014 10:41:41 AM UTC+1, Radek Svarz wrote: > > ad 1) I just react to the current implementation, where in the case of > other DBMS than PostgreSQL the hex value in 32 chars is stored. In such > cases I propose to store it in a smaller amount of 21 characters. ( = > storage optimization ) > I guess storing the raw bytes there would make sense.
ad 2) web safe representation > The goal is to translate URLs back and forth. E.g. > server.com/apiv1/client/uuid/0b043d5842ca4cab9750b705018f4a1f > <http://www.google.com/url?q=http%3A%2F%2Fserver.com%2Fapiv1%2Fclient%2Fuuid%2F0b043d5842ca4cab9750b705018f4a1f&sa=D&sntz=1&usg=AFQjCNGs6W1vUtN2o0dfBqryb9uqpc9fGw> > > should allow direct mapping to the ORM object. I am not sure whether the > current implementation allows that. Or at least the documentation is not > clear about it. > I'd expect an UUIDField to return and take UUID objects as values, or a RFC4122 compatible string representation. And regarding url safety, how is a random uuid like 729dfd34-5681-409a-8d6a-ee25b4cf3f58 not safe? The 4 byte difference to your proposed variant (the one from your server.com url) is imo not worth any hazzle (if you want you can easily strip '-'). Cheers, Florian -- You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-developers+unsubscr...@googlegroups.com. To post to this group, send email to django-developers@googlegroups.com. Visit this group at http://groups.google.com/group/django-developers. To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/f286e13c-bca3-4a0c-a223-708af322504d%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.