from django.core.exceptions import ImproperlyConfigured
from django.core.files.storage import Storage


class BaseStorage(Storage):
    def __init__(self, **settings):
        default_settings = self.get_default_settings()

        for name, value in default_settings.items():
            if not hasattr(self, name):
                setattr(self, name, value)

        for name, value in settings.items():
            if name not in default_settings:
                raise ImproperlyConfigured(
                    "Invalid setting '%s' for %s" % (
                        name,
                        self.__class__.__name__,
                    )
                )
            setattr(self, name, value)

@@ -680,28 +680,83 @@
  setattr(self, name, value)%0A
+%0A    def get_default_settings(self):%0A        return %7B%7D%0A

Add default implementation of get_default_settings to BaseStorage (#864)