Merge branch 'release/3.2.2'

* release/3.2.2:
  Bump version to 3.2.2.
  Make sure image files has a name associated.
This commit is contained in:
Bryan Veloso 2014-07-14 12:24:13 -07:00
commit b176c0cafe
2 changed files with 11 additions and 9 deletions

View file

@ -1,6 +1,7 @@
from django.core.management.base import BaseCommand
import re
from ...registry import generator_registry, cachefile_registry
from ...exceptions import MissingSource
class Command(BaseCommand):
@ -22,14 +23,15 @@ well as "a:b" and "a:b:c".""")
for generator_id in generators:
self.stdout.write('Validating generator: %s\n' % generator_id)
for file in cachefile_registry.get(generator_id):
self.stdout.write(' %s\n' % file)
try:
# TODO: Allow other validation actions through command option
file.generate()
except Exception as err:
# TODO: How should we handle failures? Don't want to error, but should call it out more than this.
self.stdout.write(' FAILED: %s\n' % err)
for image_file in cachefile_registry.get(generator_id):
if image_file.name:
self.stdout.write(' %s\n' % image_file.name)
try:
image_file.generate()
except MissingSource as err:
self.stdout.write('\t No source associated with\n')
except Exception as err:
self.stdout.write('\tFailed %s\n' % (err))
def compile_patterns(self, generator_ids):
return [self.compile_pattern(id) for id in generator_ids]

View file

@ -1,5 +1,5 @@
__title__ = 'django-imagekit'
__author__ = 'Matthew Tretter, Eric Eldredge, Bryan Veloso, Greg Newman, Chris Drackett, Justin Driscoll'
__version__ = '3.2.1'
__version__ = '3.2.2'
__license__ = 'BSD'
__all__ = ['__title__', '__author__', '__version__', '__license__']