Make Entry.get_absolute_url actually return an absolute URL, always

This commit is contained in:
Danielle McLean 2018-03-21 22:56:33 +11:00
parent 0fb62f5962
commit 6fb289727c
Signed by: 00dani
GPG key ID: 5A5D2D1AFF12EEC5

View file

@ -131,7 +131,8 @@ class Entry(ModelMeta, TimeStampedModel):
return '{0} {1}: {2}'.format(self.kind, self.id, self.title)
def get_absolute_url(self):
return self.url
base = 'https://' + Site.objects.get_current().domain
return urljoin(base, self.url)
@property
def url(self):