(newb) ImportError in script but not in interactive shell

2008-10-06 Thread Gerard flanagan
Hello, I have a utility script 'load_data.py' that primes a database with dummy data via the application Models. It sits in my project root directory: myproj/ settings.py manage.py load_data.py ... myapp/ ... When I do 'python manage.py she

Re: (newb) ImportError in script but not in interactive shell

2008-10-06 Thread Gerard flanagan
Karen Tracey wrote: > > If your code contains imports of the form myproj.myapp, then the > directory containing myproj needs to be on your PYTHONPATH when you run > the script. (manage.py shell does this for you automatically so that is > why it works there.) > > Karen > Ah, obvious really

Re: (newb) ImportError in script but not in interactive shell

2008-10-06 Thread Karen Tracey
On Mon, Oct 6, 2008 at 10:10 AM, Gerard flanagan <[EMAIL PROTECTED]>wrote: > > Hello, > > I have a utility script 'load_data.py' that primes a database with dummy > data via the application Models. It sits in my project root directory: > > myproj/ >settings.py >manage.py >