From 81832f594d7b0d3b671bf12878a77f7a34fb2f04 Mon Sep 17 00:00:00 2001 From: Malcolm Tredinnick Date: Sun, 2 Dec 2007 15:27:44 +0000 Subject: Fixed #5743 -- Tweaked the exceptions raised when importing settings so that we cooperate with Python's standard help() function. Patch from ionut_bizau and Ben Slavin. git-svn-id: http://code.djangoproject.com/svn/django/trunk@6832 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- docs/settings.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'docs') diff --git a/docs/settings.txt b/docs/settings.txt index 79de2ad22f..3157a91dc3 100644 --- a/docs/settings.txt +++ b/docs/settings.txt @@ -1166,12 +1166,12 @@ If you're not setting the ``DJANGO_SETTINGS_MODULE`` environment variable, you settings. If you don't set ``DJANGO_SETTINGS_MODULE`` and don't call ``configure()``, -Django will raise an ``EnvironmentError`` exception the first time a setting +Django will raise an ``ImportError`` exception the first time a setting is accessed. If you set ``DJANGO_SETTINGS_MODULE``, access settings values somehow, *then* -call ``configure()``, Django will raise an ``EnvironmentError`` saying settings -have already been configured. +call ``configure()``, Django will raise a ``RuntimeError`` indicating +that settings have already been configured. Also, it's an error to call ``configure()`` more than once, or to call ``configure()`` after any setting has been accessed. -- cgit v1.3