title: Run script in Django
body: <p>I am trying to run a script in Django. This script needs to be run with sudo and I have setup the sudoers file so that the command can be executed without entering the sudo password. When I am using the default test server, ie >python manage.py runserver 0.0.0.0:8000, the script executes with no problem. However, after deploying Django with Nginx and uWSGI, the command fails and returns the response </p>
  
  <pre><code>sudo: no tty present and no askpass program specified
  </code></pre>
  
  <p>Is there some sort of configuration that I have missed?</p>
  
  <p>I am using subprocess to execute the script and the code inside the Django view is like this:</p>
  
  <pre><code>subprocess.check_output( "sudo /path/to/file/fileName.sh", shell=True)
  </code></pre>