title: get_host vs META['SERVER_NAME'] and 1.0.0.127.in-addr.arpa
body: <p>I'm looking at some code and it's using request.META['SERVER_NAME'] and checking if the first 9 characters match 'localhost'. In osx the value of SERVER_NAME is '1.0.0.127.in-addr.arpa', but if I do request.get_host() I get localhost:10002 (which is the way I access it in my browser). Other developers running the same code in linux and windows gets localhost as the value from META.</p>
  
  <p>I've seen two other people asking related questions (in the comment section to the answer) <a href="https://stackoverflow.com/questions/9073342/accessing-request-meta-server-name-in-template">Accessing request.META.SERVER_NAME in template</a> and <a href="https://plus.google.com/+SamVilain/posts/8TortHZ7J5V" rel="nofollow noreferrer">https://plus.google.com/+SamVilain/posts/8TortHZ7J5V</a>. But I haven't found a way to have it behave the way I want. So my question: Is there a simple way to make django populate META[SERVER_NAME] with localhost? This is a rather large system and the check is made in lots of places so changing the variable for the call is something I'd really like to avoid.</p>