django-photofile

Template tags for thumbnail generation, with automatic rotation based on EXIF.Orientation
Download

django-photofile Ranking & Summary

Advertisement

  • Rating:
  • License:
  • GPL
  • Publisher Name:
  • Thomas Weholt
  • Publisher web site:
  • http://weholt.org

django-photofile Tags


django-photofile Description

Template tags for thumbnail generation, with automatic rotation based on EXIF.Orientation django-photofile is a Django app that provides template tags for thumbnail generation, supports automatic rotation based on EXIF.Orientation.Planned routines for metadata handling (EXIF/IPTC/XMP).Why another thumbnail app for Django?I've looked at sorl-thumbnail and others, and initially I wanted to use an existing project, but none of them supported automatic rotation based on EXIF.Orientation.Installation- Alternative a) pip install django-photofile.- Alternative b) download source, unpack and do python setup.py install.- Alternative c) hg clone https://bitbucket.org/weholt/django-photofile and do python setup.py install.UsageIn settings.py- Add 'photofile' to your INSTALLED_APPS.- Set up caching if you want.- Add a dir to your STATICFILES_DIRS or set STATIC_ROOT.In your template:{% load photofile_tags %}< img src="{% generate_thumbnail imagefile 200x300 %}"/ >or:< img src="{% generate_thumbnail imagefile 100x100 crop %}"/ >Where imagefile is an object with at a property/field called:- unique_filename or- complete_filename or- filenameResolution is specified as x, for instance 200x300 and if you want to crop the photo add crop as shown in the example over. Requirements: · Python · Django · PIL · pyexiv2


django-photofile Related Software