title: Get main domain url without hardcoding
body: <p>In Django, I have many sub domains and these have a theme installed to it. The problem is now I need to implement a function that redirects to the main domain of my project. For example when pressing a link ("Go to main domain") in the sub domain theme it will take them to the main domain.</p>
  
  <p>I can hard code this, but it's not really nice. So I'm looking for other solutions to this.</p>
  
  <p>This is a hardcoded way in <code>views.py</code>:</p>
  
  <pre><code>def network_url(request):
      return redirect('https://domain.com/')
  </code></pre>
  
  <p>So how do I create a function that do not require to hardcode the main domain?</p>