Skip to content

Commit

Permalink
Add support for Django 1.10 get_modified_time
Browse files Browse the repository at this point in the history
  • Loading branch information
jschneier committed Mar 15, 2017
1 parent b3ceb85 commit c64642e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion easy_thumbnails/utils.py
Expand Up @@ -143,7 +143,11 @@ def get_modified_time(storage, name):
datetime.
"""
try:
modified_time = storage.modified_time(name)
try:
# Prefer Django 1.10 API and fall back to old one
modified_time = storage.get_modified_time(name)
except AttributeError:
modified_time = storage.modified_time(name)
except OSError:
return 0
except NotImplementedError:
Expand Down

0 comments on commit c64642e

Please sign in to comment.