Could not find config for 'static files' in settings.STORAGES

3.1k Views Asked by At

This error occurs when running Django 4.2.The Default: django.contrib.staticfiles.storage.StaticFilesStorage has been deprecated.

1

There are 1 best solutions below

0
karimi On

The Default: django.contrib.staticfiles.storage.StaticFilesStorage has been deprecated in later versions of Django.

Deprecated since version 4.2:
This setting is deprecated. Starting with Django 4.2, static files storage engine can be configured with the STORAGES setting under the staticfiles key.

FIX
STORAGES

New in Django 4.2.
Default:

STORAGES = {
    "default": {
        "BACKEND": "django.core.files.storage.FileSystemStorage",
    },
    "staticfiles": {
        "BACKEND": "django.contrib.staticfiles.storage.StaticFilesStorage",
    },
}`