From c24455ef36c36f0a844a98e692e60d6eaae15074 Mon Sep 17 00:00:00 2001 From: mikob Date: Wed, 10 May 2017 18:03:28 +0900 Subject: [PATCH] Update README.st change model->instance for clarity in defining specs outside of models. --- README.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.rst b/README.rst index 23d26ac..7d40b05 100644 --- a/README.rst +++ b/README.rst @@ -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