title: Absolute URL in html email using Django
body: <p>Using Django, I am sending an html email that contains links but I can't get the links to work. I've tried using   <code>{{request.get_full_path}}</code> in my template, as well as <code>request.build_absolute_uri()</code> in my view. Any help would be great!</p>
  
  <p>In my site, the correct url is given in the template like this, with url="/review_and_export/":</p>
  
  <pre><code>&lt;a href="{url}{{request.get_full_path}}{{ publication.pk }}/?bibtex" target="_blank"&gt;BibTex&lt;/a&gt;
  </code></pre>
  
  <p>Currently, this is my email code:</p>
  
  <p>views.py</p>
  
  <pre><code># for links in html email??
  full_url = request.build_absolute_uri()
  full_url = full_url.split("/software/", 1)[0]   #this produces just the domain, EDIT: i was missing a slash...still having issues
  
  html_content = render_to_string(email_it, {'full_url' : full_url,....}, context_instance=RequestContext(request))
  </code></pre>
  
  <p>email_it.html</p>
  
  <pre><code>{% for publication in value %}
      {% include "software/display_citations.html" with publication=publication url=full_url%}
  {% endfor %}
  </code></pre>
  
  <p>display_citations.html</p>
  
  <pre><code># I use full_url and request.get_full_path because get_full_path doesn't return the domain
  &lt;a href="{{full_url}}{{request.get_full_path}}{{ publication.pk }}/?bibtex" target="_blank"&gt;BibTex&lt;/a&gt;
  </code></pre>