On 7-7-2012 0:20, Smaran Harihar wrote:

> I am trying to execute a python script on submit button on a html file.
> 
> So i have created a view which renders a html template file and on
> 'submit', I wish to send few parameters to the py script.
> 
> I wanted to know,
> 
> 1. where should I keep my py script?

Anywhere you want. It's probably best you describe what your script
does. We don't really understand why you want to execute a script and
not just put that code in a view function.
Other than that, a python script you want to execute is no different
than a sh script or binary command, so you'll need to use python's
subprocess or os module functions, pass arguments in proper shell syntax
and read output.
-- 
Melvyn Sopacua


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

Reply via email to