dcramer / django-uuidfield

A UUIDField for Django
BSD 3-Clause "New" or "Revised" License
262 stars 115 forks source link

String value with hyphens #20

Closed bfirsh closed 11 years ago

bfirsh commented 11 years ago

I would like to modify UUIDField to return a UUID with hyphens in it. I don't mind how it is stored (in fact, using the Postgres type, it is stored with hyphens in the database). How about an option groups=True that sets max_length to 36 and uses uuid.UUID instead of StringUUID?

rca commented 11 years ago

I added a hyphenate=True option here, please check it out:

https://github.com/baremetal/django-uuidfield/tree/hyphenated_uuid

@dcramer, thoughts on the patch?

dcramer commented 11 years ago

@rca that seems like a reasonable solution to me. Want to throw it up as a PR?

rca commented 11 years ago

PR at #21, thanks!

bfirsh commented 11 years ago

Looks like this has been fixed – thanks!