Karen Tracey wrote: > manage.py doesn't set the environment variable, it just imports settings > assuming it is in the current directory. Since you don't get an error > message that that failed, presumably it worked so the question is why is > some subsequent code trying to use the environment variable even though > settings has already been loaded. To help answer that question, the full > traceback from the error case would be helpful.
Karen, Here is the traceback. What you said did help me make a little more sense out of what's going on - Django is clearly getting to the settings file. But, then I get lost. Dave /usr/web/myproject/> python manage.py shell Traceback (most recent call last): File "manage.py", line 14, in <module> execute_manager(settings) File "/usr/local/lib/python2.5/site-packages/django/core/management/__init__.py", line 270, in execute_manager project_directory = setup_environ(settings_mod) File "/usr/local/lib/python2.5/site-packages/django/core/management/__init__.py", line 251, in setup_environ project_module = __import__(project_name, {}, {}, ['']) File "/usr/web/myproject/../myproject/__init__.py", line 1, in <module> from apps import admin File "/usr/web/myproject/../myproject/apps/admin.py", line 1, in <module> from django.contrib import admin File "/usr/local/lib/python2.5/site-packages/django/contrib/admin/__init__.py", line 1, in <module> from django.contrib.admin.options import ModelAdmin File "/usr/local/lib/python2.5/site-packages/django/contrib/admin/options.py", line 5, in <module> from django.contrib.contenttypes.models import ContentType File "/usr/local/lib/python2.5/site-packages/django/contrib/contenttypes/models.py", line 1, in <module> from django.db import models File "/usr/local/lib/python2.5/site-packages/django/db/__init__.py", line 10, in <module> if not settings.DATABASE_ENGINE: File "/usr/local/lib/python2.5/site-packages/django/conf/__init__.py", line 28, in __getattr__ self._import_settings() File "/usr/local/lib/python2.5/site-packages/django/conf/__init__.py", line 57, in _import_settings 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. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---