Also don't raise an exception during import for the Settings class since that's now deprecated.

This commit is contained in:
Jannis Leidel 2013-07-27 13:05:11 +02:00
parent 3a2fde649f
commit 2c39f5f29b

View file

@ -19,7 +19,9 @@ install_failure = ("django-configurations settings importer wasn't "
class ConfigurationBase(type):
def __new__(cls, name, bases, attrs):
if bases != (object,) and bases[0].__name__ != 'NewBase':
# also check for "Configuration" here to handle the Settings class below
# remove it when we deprecate the Settings class
if bases != (object,) and bases[0].__name__ not in ('NewBase', 'Configuration'):
# if this is actually a subclass in a settings module
# we better check if the importer was correctly installed
from . import importer
@ -82,6 +84,7 @@ class Settings(Configuration):
@classmethod
def pre_setup(cls):
# make sure to remove the handling of the Settings class above when deprecating
warnings.warn("configurations.Settings was renamed to "
"settings.Configuration and will be "
"removed in 1.0", PendingDeprecationWarning)