title: Django 1.8 : if condition on settings.py using environment variable
body: <p>I had an <strong>if</strong> condition on my django 1.7 app to alternate between production and development databases, like so:</p>
  
  <pre><code>if os.getenv('SETTINGS_MODE') == 'dev':
      DATABASES = {
          'default': {
              ...
              }
          }
  else:
      DATABASES = {
          'default': {
              ...
          }
      }
  </code></pre>
  
  <p>But I upgraded to django 1.8 and now that no longer works, it always runs the <strong>else</strong> condition. I still have the 'SETTINGS_MODE' variable and it's still set to 'dev'. If I run the django shell with <code>python manage.py shell</code>, the the condition evaluates to <strong>True</strong> there:</p>
  
  <pre><code>In [1]: import os
  
  In [2]: os.getenv('SETTINGS_MODE') == 'dev'
  Out[2]: True
  </code></pre>
  
  <p>And if I change the <strong>if</strong> condition to  <code>if True:</code> it works, so I don't know what is wrong, as they should be the same.</p>
  
  <p>How can I do that on django 1.8?</p>