title: How to automatically reload Django when files change?
body: <p>How to automatically monitor .py, .js and other source code files to restart a Django (or any other for that matter) application and refresh the browser when the source changes? This is possible in Rails using guard, in JS apps using grunt-contrib-watch and the accompanying livereload browser plugin. How can I do it for Python web apps such as Django?</p>
  
  <p>I start my Django server with</p>
  
  <pre><code>foreman start
  </code></pre>
  
  <p>this is my Procfile:</p>
  
  <pre><code>web: newrelic-admin run-program gunicorn app.wsgi
  </code></pre>
  
  <p>as suggested by the Heroku/Newrelic docs or the usual</p>
  
  <pre><code>python manage.py runserver
  </code></pre>
  
  <p>The <code>runserver</code> method does restart the server on .py source changes, but not the browser and doesn't watch other files - I could run guard alongside it, but then I have two processes I have to take care of, whereas grunt or rake offer unified interfaces. I'm wondering what is the recommended way of doing this among Python developers?</p>
  
  <p>I could not find any detailed, comprehensive documentation on this - only incomplete discussions <a href="https://stackoverflow.com/questions/12773763/gunicorn-autoreload-on-source-change">here</a> and <a href="https://stackoverflow.com/questions/19073878/how-to-livereload-django-templates">there</a>.</p>