Update README.st change model->instance for clarity in defining specs outside of models.

This commit is contained in:
mikob 2017-05-10 18:03:28 +09:00 committed by GitHub
parent 934a5283ad
commit c24455ef36

View file

@ -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