On Sep 28, 2007, at 4:12 PM, Jason Witherspoon wrote:

> What am I doing wrong?  Do I need to somehow reload Python to get  
> it to take the new path?
>

Okay, I'm guessing a Python reload would indeed help, as I've managed  
to get the Python debugger to find mysite.drpack.views by forcing the  
paths into sys.path:

 >>> sys.path.append('/my/new/path')

...rather than via the symlink method.  Seems like this doesn't alter  
the sys.path permanently, though, as the paths I append evaporate a  
bit later when I leave IDLE & re-check sys.path....?

NOW, the problem is I'm getting:

EnvironmentError: Environment variable DJANGO_SETTINGS_MODULE is  
undefined (more fully:

     from mysite.drpack.models import PubMedSummary
   File "/home/jason/killdjangokill/mysite/../mysite/drpack/ 
models.py", line 1, in <module>
     from django.db import models                                               
                                                #so the module's  
importing okay when I append it to the sys.path
   File "/usr/local/lib/python2.5/site-packages/django/db/ 
__init__.py", line 10, in <module>
     if not settings.DATABASE_ENGINE:                                           
                                                #but django.db is  
failing to import the settings.py, also on sys.path?
   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 55, in _import_settings
     raise EnvironmentError, "Environment variable %s is undefined."  
% ENVIRONMENT_VARIABLE
EnvironmentError: Environment variable DJANGO_SETTINGS_MODULE is  
undefined.

)


After doing some research, it seems that manually configuring  
settings at runtime might help:

http://www.djangoproject.com/documentation/settings/#using-settings- 
without-setting-django-settings-module

But I'd really rather that Python, & consequently the Python  
debugger, just import all my django paths & settings & have done w/it--

Clearly no idea what I'm doing here, thanks for folks' patience!
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to