title: Django 1.4 Deployment and os.environ.setdefault
body: <p>In the new Django 1.4 project layout, I have a declaration of os.environ.setdefault on manage.py and wsgi.py inside the project folder. What is the difference between the two?</p>
  
  <p>Also, if I have this settings structure:</p>
  
  <pre><code>mysite
  |-- mysite
  |   |-- settings
  |   |-- base.py
  |   |-- dev.py
  |   |-- production.py
  |   wsgi.py
  |-- myapp
  |-- manage.py
  </code></pre>
  
  <p>which os.environ.setdefault should I edit? The one in manage.py or the one in wsgi.py?</p>
  
  <pre><code>os.environ.setdefault("DJANGO_SETTINGS_MODULE", "mysite.settings")
  </code></pre>
  
  <p>also, in which file should I detect the current env? and how do I do so?</p>