﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
824	Need change the Environment variable DJANGO_SETTINGS_MODULE check	limodou@…	Adrian Holovaty	"If I want to import some django module in IDLE to do some testing work, but I may get follows execption:

>>> import django.core.formfields

Traceback (most recent call last):
  File ""<pyshell#0>"", line 1, in -toplevel-
    import django.core.formfields
  File ""c:\python24\lib\site-packages\django-0.90-py2.4.egg\django\core\formfields.py"", line 1, in -toplevel-
    from django.core import validators
  File ""c:\python24\lib\site-packages\django-0.90-py2.4.egg\django\core\validators.py"", line 28, in -toplevel-
    from django.conf.settings import JING_PATH
  File ""c:\python24\lib\site-packages\django-0.90-py2.4.egg\django\conf\settings.py"", line 29, in -toplevel-
    raise EnvironmentError, ""Environment variable %s is undefined."" % ENVIRONMENT_VARIABLE
EnvironmentError: Environment variable DJANGO_SETTINGS_MODULE is undefined.

Can you change the checking to DJANGO_SETTINGS_MODULE? I think if there is no DJANGO_SETTINGS_MODULE Environment variable or command line argument, the django should use current path as the value of DJANGO_SETTINGS_MODULE or omit it at all. That should be better. And I also can import some django module in IDLE without exception."	enhancement	closed	Core (Other)		normal	invalid			Unreviewed	0	0	0	0		
