Login

Snippets by johan

Snippet List

ThumbnailMixIn

Example mixin for creating and removing thumbnails on a model. Also adds some methods for accessing an url for an image size. It might be a better idea to use a custom image field instead of this approach. Idea for getting the image url for different sizes from http://code.google.com/p/django-photologue Example usage <pre> >>> p.get_small_image_url() u'http://127.0.0.1:8000/site_media/photos/small_someimage.jpg' </pre>

  • image
  • thumbnail
  • model
  • mixin
Read More

johan has posted 1 snippet.