Not a dumb question. This depends on how sys.path is set. The app that
you are importing still needs to be on the sys.path - either set via
Python code or using the PYTHONPATH env var. If you are running the
test server with manage.py then the directory above your apps is on the
sys.path implicitly because that's the directory that the manage.py
script is in (I think...). Hence import of the apps works. If you run
the server using 'django-admin.py runserver' the path setup is
different and the import will fail. This is also true if you are
running the production server via mod_python. So one way of making sure
this works is to put the app's parent directory on your PYTHONPATH.
Similar to how you have to tell Python where to find mysite.settings
but one dir down. Eg:

export PYTHONPATH=/path/to/mysite:/path/to

/path/to/mysite = to pick up the apps
/path/to = to pick up mysite.settings

Simon


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to