djangosnippets.org: Latest snippets posted by bretthhttps://djangosnippets.org/users/bretth/2012-04-17T00:54:16.325766-05:00bretthPrefetch id for Postgresql backend
2012-04-17T00:54:16.325766-05:00bretthhttps://djangosnippets.org/snippets/2731/<p>When uploading a file or image, you need to put it somewhere that's not going to be orphaned by a change in the model. You could use a globally unique value like a uuid, but the django id autofield is a much shorter surrogate field that can be used in …</p>
Freely redistributable