title: Get Django ALLOWED_HOSTS env. variable formated right in settings.py
body: <p>I'm facing the following issue. My .env files contains a line like:</p>
  
  <pre><code>export SERVERNAMES="localhost domain1 domain2 domain3" &lt;- exactly this kind of format
  </code></pre>
  
  <p>But the variable called <code>SERVERNAMES</code> is used multiple times at multiple locations of my deployment so i can't declare this as compatible list of strings that settings.py can use imidiatly. beside I don't like to set multiple variables of .env for basically the same thing. So my question is how can I format my <code>ALLOWED_HOSTS</code> to be compatible with my settings.py. Something like this does not seem to work it seems:</p>
  
  <pre><code>ALLOWED_HOSTS = os.environ.get('SERVERNAMES').split(',')
  </code></pre>
  
  <p>Thanks and kind regards</p>