Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The STATICFILES_STORAGE setting is deprecated in Django 4.2 #1758

Closed
radwon opened this issue Apr 9, 2023 · 0 comments · Fixed by #1759
Closed

The STATICFILES_STORAGE setting is deprecated in Django 4.2 #1758

radwon opened this issue Apr 9, 2023 · 0 comments · Fixed by #1759
Assignees

Comments

@radwon
Copy link
Member

radwon commented Apr 9, 2023

The Static files panel produces the following warning in Django 4.2

RemovedInDjango51Warning: The STATICFILES_STORAGE setting is deprecated. Use STORAGES instead.

This is due to the use of the django.core.files.storage.get_storage_class() function which has been deprecated.

I will submit a patch and pull request to resolve this issue.

@radwon radwon self-assigned this Apr 9, 2023
radwon added a commit that referenced this issue Apr 9, 2023
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
radwon added a commit that referenced this issue Apr 9, 2023
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
matthiask pushed a commit that referenced this issue Apr 9, 2023
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant