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 redirection:
>
> python manage.py shell < script.py
>
> Is there a better way to do this?  Would it be useful to take an
> argument from the 'manage.py shell' to support this?

Hi Casey,

I think you may be missing something here... If you just want to run a
script, there's no need to run the manage.py shell. Just run your
script!

    export DJANGO_SETTINGS_MODULE=mysite.settings
    python script.py

The key is to set the DJANGO_SETTINGS_MODULE environment variable beforehand.

Adrian

-- 
Adrian Holovaty
holovaty.com | djangoproject.com

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to