diff --git a/CHANGES.rst b/CHANGES.rst index 68c4a1e..34e13c4 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -10,7 +10,11 @@ v0.4 (2013-XX-XX) including populating them from environment variables. - Renamed ``configurations.Settings`` class to ``configurations.Configuration`` - to better describe what the class is all about. + to better describe what the class is all about. The old class still exists + and is marked as pending deprecation. It'll be removed in version 1.0. + +- Added a ``setup`` method to handle the new ``Value`` classes and allow an + in-between modification of the configuration values. - Added Django project templates for 1.5.x and 1.6.x. diff --git a/docs/patterns.rst b/docs/patterns.rst index 5c8100a..7b199c3 100644 --- a/docs/patterns.rst +++ b/docs/patterns.rst @@ -117,6 +117,7 @@ settings loading happens, please override the ``pre_setup``, ``setup`` or @classmethod def pre_setup(cls): + super(Prod, cls).pre_setup() if something.completely.different(): cls.DEBUG = True @@ -127,6 +128,7 @@ settings loading happens, please override the ``pre_setup``, ``setup`` or @classmethod def post_setup(cls): + super(Prod, cls).post_setup() logging.debug("done setting up! \o/") As you can see above the ``pre_setup`` method can also be used to @@ -163,5 +165,5 @@ connecting to a database:: .. versionchanged:: 0.4 A new ``setup`` method was added to be able to handle the new - :class:`~configurations.values.Value` classes and allow a in-between + :class:`~configurations.values.Value` classes and allow an in-between modification of the configuration values.