Skip to content

Commit

Permalink
Added support for Python 2.6 and removed support for django HEAD
Browse files Browse the repository at this point in the history
  • Loading branch information
saulshanabrook committed Mar 20, 2013
1 parent 4eb7833 commit ab9d326
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 9 deletions.
6 changes: 1 addition & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,8 @@ python:
- "2.7"
- "2.6"
install:
- pip install --no-deps -e .
- pip install -q -e .
- pip install -q --use-mirrors -r requirements-testing.txt
- pip install -q --use-mirrors -U $DJANGO_VERSION
script:
- coverage run --branch --source=simpleimages -m django-mini -a simpleimages -a simpleimages.test --test-runner 'discover_runner.DiscoverRunner' test
- coveralls
env:
- DJANGO_VERSION="django>=1.5,<1.6"
- DJANGO_VERSION="git+git://github.com/django/django.git@master"
4 changes: 2 additions & 2 deletions simpleimages/management/commands/retransform.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ class Command(BaseCommand):

def handle(self, *args, **options):
for arg in args:
self.stdout.write('Transforming {}'.format(arg))
self.stdout.write('Transforming {0}'.format(arg))
arg_values = arg.split('.')
arg_values.extend(repeat(None, 3 - len(arg_values)))
app_name, model_name, field_name = arg_values
model = get_model(app_name, model_name)
instances = model._default_manager.all()
self.stdout.write('Transforming {}.{}'.format(instances, field_name))
self.stdout.write('Transforming {0}.{1}'.format(instances, field_name))

utils.perform_transformation(
instances=instances,
Expand Down
4 changes: 2 additions & 2 deletions simpleimages/transforms.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def scale_image_function(django_file):
def pil_image_from_django_file(django_file):
if not isinstance(django_file, File):
raise TypeError(
'image is a {}, not a django File'.format(type(django_file))
'image is a {0}, not a django File'.format(type(django_file))
)
if not django_file.file:
raise ValueError(
Expand All @@ -38,7 +38,7 @@ def pil_image_from_django_file(django_file):
def django_file_from_pil_image(transformed_pil_image, file_name):
if not isinstance(transformed_pil_image, Image.Image):
raise TypeError(
'image is a {}, not a PIL Image'.format(type(transformed_pil_image))
'image is a {0}, not a PIL Image'.format(type(transformed_pil_image))
)
temp_io = StringIO()
transformed_pil_image.save(temp_io, format='JPEG')
Expand Down

0 comments on commit ab9d326

Please sign in to comment.