1
0
mirror of https://github.com/django/django.git synced 2025-10-24 06:06:09 +00:00

Fixed #28606 -- Deprecated CachedStaticFilesStorage.

This commit is contained in:
Tim Graham
2018-10-27 10:30:28 -04:00
parent 55b0b766fb
commit f892781b95
11 changed files with 58 additions and 41 deletions

View File

@@ -3,6 +3,7 @@ import json
import os
import posixpath
import re
import warnings
from collections import OrderedDict
from urllib.parse import unquote, urldefrag, urlsplit, urlunsplit
@@ -14,6 +15,7 @@ from django.core.cache import (
from django.core.exceptions import ImproperlyConfigured
from django.core.files.base import ContentFile
from django.core.files.storage import FileSystemStorage, get_storage_class
from django.utils.deprecation import RemovedInDjango31Warning
from django.utils.functional import LazyObject
@@ -474,7 +476,13 @@ class CachedStaticFilesStorage(CachedFilesMixin, StaticFilesStorage):
A static file system storage backend which also saves
hashed copies of the files it saves.
"""
pass
def __init__(self, *args, **kwargs):
warnings.warn(
'CachedStaticFilesStorage is deprecated in favor of '
'ManifestStaticFilesStorage.',
RemovedInDjango31Warning, stacklevel=2,
)
super().__init__(*args, **kwargs)
class ManifestStaticFilesStorage(ManifestFilesMixin, StaticFilesStorage):