From 2c39f5f29bf8fbce7f1d8263254b4bcd8a7756da Mon Sep 17 00:00:00 2001 From: Jannis Leidel Date: Sat, 27 Jul 2013 13:05:11 +0200 Subject: [PATCH] Also don't raise an exception during import for the Settings class since that's now deprecated. --- configurations/base.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/configurations/base.py b/configurations/base.py index 9b6b6c7..5669c04 100644 --- a/configurations/base.py +++ b/configurations/base.py @@ -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)