Skip to content

Commit

Permalink
Use the new STORAGES setting in Django 4.2
Browse files Browse the repository at this point in the history
Use the new STORAGES setting in Django 4.2

In Django 4.2 the django.core.files.storage.get_storage_class() function
is deprecated as well as the STATICFILES_STORAGE setting in favor of
STORAGES["staticfiles"].

Use django.core.files.storage.storages to get the configured storage
class for static files instead.

For Django versions prior to 4.2 keep using the
django.core.files.storage.get_storage_class() function for backwards
compatibility.

Fixes #1758
  • Loading branch information
radwon authored and matthiask committed Apr 9, 2023
1 parent bbba2f8 commit 7ededd2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docs/changes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ Change log
Pending
-------

* Added support for the new STORAGES setting in Django 4.2 for static files.

4.0.0 (2023-04-03)
------------------

Expand Down

0 comments on commit 7ededd2

Please sign in to comment.