title: Run .env file in django app with python-dotenv when starting shell
body: <p>I'm trying to use <a href="https://github.com/theskumar/python-dotenv" rel="nofollow noreferrer">python-dotenv</a> to run the <code>.env</code> file when running <code>./manage.py shell</code>.</p>
  
  <p>But <code>.env</code> isn't run when I start shell. Nothing different than normal happens.</p>
  
  <p><strong>What I've done:</strong></p>
  
  <ol>
  <li>installed <code>python-dotenv</code> with <code>pip install python-dotenv</code> in my virtual environment</li>
  <li>added a <code>.env</code> file in the same directory as my project <code>settings.py</code></li>
  </ol>
  
  <p>Also added below to <code>settings.py</code>:</p>
  
  <pre><code>from dotenv import load_dotenv
  load_dotenv()
  </code></pre>
  
  <p>For context, my <code>.env</code> looks like:</p>
  
  <pre><code>export PYTHONSTARTUP=`pwd`/.pythonrc.py
  echo "environment variables set"
  </code></pre>
  
  <p>And I'm exporting <code>.pythonrc.py</code> so I can do some imports when shell is loaded.</p>
  
  <p>I'm pretty new to django. Am I missing something obvious?</p>