Because the environment variable (DJANGO_SETTINGS_MODULE) needs to point
to the Python module in Python package syntax (ie, dotted path syntax).
So the package ("mysite" in the example below) must be on the Python
path (which is what sys.path.append does below).

On Fri, 2006-08-25 at 11:52 -0700, [EMAIL PROTECTED] wrote:
> 
> [EMAIL PROTECTED] wrote:
> > Try this:
> >
> > import sys
> > import os
> > sys.path.append('path to where mysite is')
> > os.environ['DJANGO_SETTINGS_MODULE'] = 'mysite.settings'
> >
> > from mysite.myapp.views import *
> > from mysite.myapp.models import *
> 
> Thx - it works - but why?
> ;-)
> 
> Timothy
> 
> 
> > 


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