Re: Run script from management.py

2007-08-28 Thread Jeremy Dunck
On 8/28/07, Rob Hudson <[EMAIL PROTECTED]> wrote: > > I've approached this like the following, though I'd be interested to > hear if there is a better way. I like putting the environ settings in > the script itself so everything is self contained (could be run from > cron, etc)... cron can set e

Re: Run script from management.py

2007-08-28 Thread Rob Hudson
I've approached this like the following, though I'd be interested to hear if there is a better way. I like putting the environ settings in the script itself so everything is self contained (could be run from cron, etc)... At the top of my Python file I have this: import os, sys # Connect to Dja

Re: Run script from management.py

2007-08-27 Thread Adrian Holovaty
On 8/27/07, Casey T. Deccio <[EMAIL PROTECTED]> wrote: > I would find it extremely useful to pass a script argument to the > 'manage.py shell' command, so I could run arbitrary scripts using the > models library defined in project/app. I can't currently see a way to > do this except using input r

Re: Run script from management.py

2007-08-27 Thread George Vilches
Casey T. Deccio wrote: > I would find it extremely useful to pass a script argument to the > 'manage.py shell' command, so I could run arbitrary scripts using the > models library defined in project/app. I can't currently see a way to > do this except using input redirection: > > python manage.p

Run script from management.py

2007-08-27 Thread Casey T. Deccio
I would find it extremely useful to pass a script argument to the 'manage.py shell' command, so I could run arbitrary scripts using the models library defined in project/app. I can't currently see a way to do this except using input redirection: python manage.py shell < script.py Is there a bet