title: Django how to specify a base url
body: <p>So there should be a very basic way to do this, but unfortunately I don't seem to be able to find it. </p>
  
  <p>How can one set an Href link to point to the 'base website url' + the 'link', rather than adding the link to the current page. </p>
  
  <p>I.e. if I'm at www.example.com/content1/</p>
  
  <p>I want the search function to go to www.example.com/search/</p>
  
  <p>and not www.example.com/content1/search </p>
  
  <p>I could just specify "www.example.com/search/" but then if it page is deployed locally I end up with a bunch of links to non-existent pages or vice versa. How can I specify the The Base hosting URL using DJango (whichever the server is running, whether the hostname, the current server ip, localhost etc.). </p>