Friday, March 25, 2011

How to run a file.py in the django environement

I wrote a simple django application just to write a record in a table

I can run this application from the django shell, i.e., typing
python manage.py shell
and then
>>> execfile('app/filename.py')

It works, but I'd like to call filename.py directly from the ubuntu
command line or from a shell script.

Is there any command like
python manage.py shell filename.py (I know this particular command
isn't allowed, but is there any other?)

thanks,
JA

--
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 django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

No comments:

Post a Comment