Enable django.contrib.sites rather than using a custom lemoncurry-specific setting for the site name

This commit is contained in:
Danielle McLean 2017-10-29 12:12:39 +11:00
parent 7429d43280
commit c354830653
Signed by: 00dani
GPG key ID: 5A5D2D1AFF12EEC5
5 changed files with 12 additions and 15 deletions

View file

@ -19,7 +19,7 @@ def add_links(request, dest):
def host_meta(request):
h = XRD()
h.attributes.append(Attribute('xmlns:hm', 'http://host-meta.net/ns/1.0'))
h.elements.append(Element('hm:Host', request.META['HTTP_HOST']))
h.elements.append(Element('hm:Host', request.site.domain))
add_links(request, h.links)
return h