mirror of
https://github.com/Hopiu/django-imagekit.git
synced 2026-03-24 17:00:24 +00:00
Simplify get_hash implementation
This commit is contained in:
parent
7578903307
commit
2a6199b804
1 changed files with 8 additions and 8 deletions
|
|
@ -102,14 +102,14 @@ class ImageSpec(BaseImageSpec):
|
|||
'%s%s' % (hash, ext))
|
||||
|
||||
def get_hash(self):
|
||||
return md5(''.join([
|
||||
self.source_file.name,
|
||||
pickle.dumps(self.kwargs),
|
||||
pickle.dumps(self.processors),
|
||||
str(self.format),
|
||||
pickle.dumps(self.options),
|
||||
str(self.autoconvert),
|
||||
]).encode('utf-8')).hexdigest()
|
||||
return md5(pickle.dumps([
|
||||
self.source_file,
|
||||
self.kwargs,
|
||||
self.processors,
|
||||
self.format,
|
||||
self.options,
|
||||
self.autoconvert,
|
||||
])).hexdigest()
|
||||
|
||||
def generate(self):
|
||||
# TODO: Move into a generator base class
|
||||
|
|
|
|||
Loading…
Reference in a new issue