title: Django how to get request.get_host?
body: <p>Thankyou for reading my problem.I am not getting the request get host.I am sending an email to the drivers those who registered in my app.I am sending a Booking link with their id in URL. The problem is that i am not getting the host with it. 
  For eg
  
  after hitting the link i want him to redirect to the page where he can see the car.</p>
  
  <p><strong>Output in mail After sending email :</strong></p>
  
  <p><em>Please hit the link and book a car /drivers/2/</em></p>
  
  <p>but i want a proper link to send him in mail</p>
  
  <p><strong>for eg</strong></p>
  
  <p><em><a href="http://127.0.0.1:8000/drivers/1/" rel="nofollow noreferrer">http://127.0.0.1:8000/drivers/1/</a></em></p>
  
  <p><strong>Views.Py</strong></p>
  
  <pre><code>from django.template import Context, Template as mailt
  
  @csrf_exempt
  def rentacar_carapp_approve(request):
      if request.POST:
          try:
              args['driver'] = driver = Driver.objects.get(id=request.POST.get('driver_id'))
              subject = "Please Register Your Car"
              from_email = settings.EMAIL_HOST_USER
              to_email = 'bakrshk@gmail.com'
              if to_email is not None:
                  template = mailt("""Please hit the link and book a car {{ request.get_host }}{% url 'detail' driver_id=driver_id %}""")
                  ctx = Context({'driver_id': driver.id})
                  join_message = template.render(ctx)
                  send_mail(subject=subject, from_email=from_email, recipient_list=[to_email], message=join_message,
                            fail_silently=False)
                  print("email sent")
                  print(request.get_host)
          except Driver.DoesNotExist:
              print("Driver doesn't exists")
  </code></pre>
  
  <p><strong>Url.py</strong></p>
  
  <pre><code>url(r'^drivers/(?P&lt;driver_id&gt;\d+)/$', rent_views.detail, name='detail'),
  </code></pre>