Skip to content
This repository has been archived by the owner on Sep 22, 2020. It is now read-only.

Commit

Permalink
Use keyword arguments in thumbnail url
Browse files Browse the repository at this point in the history
  • Loading branch information
relekang committed Apr 11, 2015
1 parent ae38602 commit a04895b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions docs/settings.rst
Original file line number Diff line number Diff line change
Expand Up @@ -119,5 +119,5 @@ Dummy thumbnails

| This is the url that the dummy url is generated from. It should be a
string that can be used with ``string.format`` and the arguments are width
and height, ``THUMBNAIL_DUMMY_URL.format(width, height)``
| **Default:** `http://puppies.lkng.me/{}x{}`
and height, ``THUMBNAIL_DUMMY_URL.format(width=width, height=height)``
| **Default:** `http://puppies.lkng.me/{width}x{height}`
2 changes: 1 addition & 1 deletion thumbnails/conf/defaults.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@
THUMBNAIL_FILTER_OPTIONS = {'size': '500'}

THUMBNAIL_DUMMY = False
THUMBNAIL_DUMMY_URL = 'http://puppies.lkng.me/{}x{}'
THUMBNAIL_DUMMY_URL = 'http://puppies.lkng.me/{width}x{height}'
2 changes: 1 addition & 1 deletion thumbnails/engines/dummy.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def create(self, original, size, crop, options=None):
return thumbnail

def _get_url(self, size):
return settings.THUMBNAIL_DUMMY_URL.format(size[0], size[1])
return settings.THUMBNAIL_DUMMY_URL.format(width=size[0], height=size[1])

def cleanup(self, original):
pass

0 comments on commit a04895b

Please sign in to comment.