title: Django - How to simply get domain name?
body: <p>Firstly, I want to say that I'm a beginner in Django.</p>
  
  <p>I'm looking for a simple way to retrieve the domain name of my Django website.</p>
  
  <p>I want to do this in my settings.py. I've already tried with the socket something like this: </p>
  
  <blockquote>
    <p>socket.gethostname()</p>
  </blockquote>
  
  <p>but this doesn't work correctly.</p>