From 9845befd961f295134e744557b9b8c67549b8a89 Mon Sep 17 00:00:00 2001 From: Josh Ourisman Date: Tue, 28 Jun 2011 11:08:05 -0700 Subject: [PATCH] Added the pk of the object into the dictionary of values passed to the string formatting for cache_filename. --- imagekit/specs.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/imagekit/specs.py b/imagekit/specs.py index adad12b..5fc80a7 100644 --- a/imagekit/specs.py +++ b/imagekit/specs.py @@ -83,7 +83,8 @@ class Accessor(object): if issubclass(processor, processors.Format): extension = processor.extension cache_filename = self._obj._ik.cache_filename_format % \ - {'filename': filename, + {'pk': self._obj.pk, + 'filename': filename, 'specname': self.spec.name(), 'extension': extension.lstrip('.')} if callable(self._obj._ik.cache_dir):