djangosnippets.org: Latest snippets tagged with 'uuid'https://djangosnippets.org/tags/uuid/2014-03-06T12:02:47-06:00autogenerated UUID model field 2014-03-06T12:02:47-06:00kedarhttps://djangosnippets.org/snippets/3034/<p>Provides UUIDField for your models. This version creates very short UUID represenation (21 chars) when the record is added eg. in admin. Generated ids are safe to be used in URLs.</p>
<p>You can put represent it in admin as </p>
<p>'readonly_fields=("uuid",)'</p>
Freely redistributableArbitrary auto-generated primary keys2010-07-23T11:23:53-05:00gsakkishttps://djangosnippets.org/snippets/2122/<p>Auto-incremented primary keys are the default in Django and they are supported natively in most databases but for anything more complex things are less trivial. DB sequences are not standard, may not be available and even if they are, they are typically limited to simple integer sequence generators. This snippet ...</p>
Freely redistributableUUIDField oriented django User2009-05-07T09:42:58-05:00bwhittingtonhttps://djangosnippets.org/snippets/1497/<p>This code monkey-patches the default User model to rather use a primary key of UUIDField (see http://www.djangosnippets.org/snippets/1496/). This code also makes the email field required. This code is wildly dangerous, not completely future proof, and probably not advisable to use. If you do wish to ...</p>
Freely redistributableUUIDField2009-05-07T09:34:43-05:00bwhittingtonhttps://djangosnippets.org/snippets/1496/<p>This snippet provides a uuid field for models, improving on the work in http://www.djangosnippets.org/snippets/335/</p>
Freely redistributableuuid template tag2009-03-07T14:27:24-06:00nomadjourneyhttps://djangosnippets.org/snippets/1356/<p>A simple template tag that generates a random UUID and stores it in a name context variable.</p>
Freely redistributableuuid model field2008-12-23T09:20:50-06:00newspirehttps://djangosnippets.org/snippets/1262/<p>This code provides a primary key field that is globally unique. It uses the pre_save method to auto-populate the field with a Universal Unique Id as the record is saved the first time.</p>
Freely redistributableUUIDField2007-07-22T20:53:55-05:00trbshttps://djangosnippets.org/snippets/335/<p>UUIDField is a field which stores an uuid generated by pythons new uuid module.</p>
<p>it's included with the python 2.5 distribution by default, but if you run an older version of python you can happily copy the file from 2.5 to django/utils/uuid.py or your ...</p>
Freely redistributable