mirror of
https://github.com/Hopiu/django-imagekit.git
synced 2026-03-16 21:30:23 +00:00
Update README.st change model->instance for clarity in defining specs outside of models.
This commit is contained in:
parent
934a5283ad
commit
c24455ef36
1 changed files with 2 additions and 2 deletions
|
|
@ -423,9 +423,9 @@ To use specs defined outside of models:
|
|||
format = 'JPEG'
|
||||
options = {'quality': 60 }
|
||||
|
||||
def cached_admin_thumb(model):
|
||||
def cached_admin_thumb(instance):
|
||||
# `image` is the name of the image field on the model
|
||||
cached = ImageCacheFile(AdminThumbnailSpec(model.image))
|
||||
cached = ImageCacheFile(AdminThumbnailSpec(instance.image))
|
||||
# only generates the first time, subsequent calls use cache
|
||||
cached.generate()
|
||||
return cached
|
||||
|
|
|
|||
Loading…
Reference in a new issue