djangosnippets.org: Latest snippets posted by trubliphonehttps://djangosnippets.org/users/trubliphone/2013-02-03T16:02:44.276473-06:00trubliphonedecorator to add GUID Field to Django Models
2013-02-03T16:02:44.276473-06:00trubliphonehttps://djangosnippets.org/snippets/2888/<p>A decorator to add a GUID Field to a Django Model. There are other bits of code out there that do similar things, but it was important for the field to have a unique value <em>before</em> it is saved in the database. The contribute_to_class method therefore registers the field class …</p>
Freely redistributable