djangosnippets.org: Latest snippets posted by clawlorhttps://djangosnippets.org/users/clawlor/2010-09-15T20:29:54.568058-05:00clawlorcreate_template_postgis-ubuntu_lucid
2010-09-15T20:29:54.568058-05:00clawlorhttps://djangosnippets.org/snippets/2197/<p>The template creation script referenced <a href="http://docs.djangoproject.com/en/dev/ref/contrib/gis/install/#ubuntudebian">here</a> doesn't work on Ubuntu Lucid, where the default PostgreSQL version is now 8.4 and some things have been moved around. I've edited the script to work on Ubuntu Lucid.
</p>
Freely redistributableImage model with thumbnail
2010-07-04T19:28:41.438706-05:00clawlorhttps://djangosnippets.org/snippets/2094/<p>A relatively simple Photo model which generates its own thumbnail when saved. A default size is specified as <code>thumb_size</code> in the <code>save()</code> arguments.</p>
<p>Other thumbnailing strategies don't save the thumbnail dimensions, and since the actual dimensions of the thumbnail created by PIL's <code>thumbnail</code> method are somewhat non-deterministic, it is difficult …</p>
Freely redistributable