Hi, Funny you guys should mention that =), after Mike's post, I ended up just using David Cramer's django-uuidfield (https://github.com/dcramer/django-uuidfield) package.
(There's also django-shortuuidfield - https://github.com/nebstrebor/django-shortuuidfield). For Postgres, this uses the uuid type - http://www.postgresql.org/docs/9.1/static/datatype-uuid.html). This also sets unique=True - not sure what happens if there's a collision, I assume it just won't create that one. The only thing I was concerned about was a performance hit from calculating the UUID for each transaction, however, I suspect that's something I don't need to worry about until down the track. Cheers, Victor On Friday, 19 July 2013 23:45:06 UTC+10, Javier Guerra wrote: > > On Fri, Jul 19, 2013 at 4:26 AM, Tom Evans > <[email protected]<javascript:>> > wrote: > > Because of this, I usually add a uuid field as a unique key, but leave > > id as the primary key. > > same here. > > but only for those tables whose records would be seen by the public. > kinda like 'slugs for non-textual objects' > > -- > Javier > -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/django-users. For more options, visit https://groups.google.com/groups/opt_out.

