Commit aa757ac2 authored by Adrian Holovaty's avatar Adrian Holovaty
Browse files

Merge pull request #43 from techtonik/patch-1

Fixed #18267 -- document `settings.configured` property.
parents 5f75ac91 59d2b8aa
Loading
Loading
Loading
Loading
+11 −2
Original line number Diff line number Diff line
@@ -242,7 +242,16 @@ is accessed.

If you set ``DJANGO_SETTINGS_MODULE``, access settings values somehow, *then*
call ``configure()``, Django will raise a ``RuntimeError`` indicating
that settings have already been configured.
that settings have already been configured. There is a property just for this
purpose:

.. attribute: django.conf.settings.configured

For example::

    from django.conf import settings
    if not settings.configured:
        settings.configure(myapp_defaults, DEBUG=True)

Also, it's an error to call ``configure()`` more than once, or to call
``configure()`` after any setting has been accessed.