mirror of
https://github.com/jazzband/django-avatar.git
synced 2026-03-16 22:20:30 +00:00
Change storage lookup key
Change from hardcoded staticfile to one based on AVATAR_STORAGE setting.
This commit is contained in:
parent
69d7901d74
commit
e34b3d9762
1 changed files with 2 additions and 2 deletions
|
|
@ -21,12 +21,12 @@ try:
|
|||
# of the deprecated django.core.files.storage.get_storage_class
|
||||
from django.core.files.storage import storages
|
||||
|
||||
avatar_storage = storages["staticfiles"].__class__
|
||||
avatar_storage = storages[settings.AVATAR_STORAGE].__class__
|
||||
except ImportError:
|
||||
# Backwards compatibility for Django versions prior to 4.2
|
||||
from django.core.files.storage import get_storage_class
|
||||
|
||||
avatar_storage = get_storage_class(settings.STATICFILES_STORAGE)
|
||||
avatar_storage = get_storage_class(settings.AVATAR_STORAGE)
|
||||
|
||||
|
||||
def avatar_path_handler(
|
||||
|
|
|
|||
Loading…
Reference in a new issue