Django.db import error
Question: 
    File "<stdin>", line 1, in <module>
      File "/usr/local/lib/python2.6/dist-packages/django/db/__init__.py", line 14, in <module>
        if not settings.DATABASES:
      File "/usr/local/lib/python2.6/dist-packages/django/utils/functional.py", line 276, in __getattr__
        self._setup()
      File "/usr/local/lib/python2.6/dist-packages/django/conf/__init__.py", line 40, in _setup
        raise ImportError("Settings cannot be imported, because environment variable %s is undefined." % ENVIRONMENT_VARIABLE)
    ImportError: Settings cannot be imported, because environment variable DJANGO_SETTINGS_MODULE is undefined.
    

How can I set the environment variable?


Answer: ["Standalone Django
scripts"](http://www.b-list.org/weblog/2007/sep/22/standalone-django-scripts/)

