Make Entry.get_absolute_url actually return an absolute URL, always

pull/1/head
Danielle McLean 4 years ago
parent 0fb62f5962
commit 6fb289727c
Signed by: 00dani
GPG Key ID: 5A5D2D1AFF12EEC5
  1. 3
      entries/models.py

@ -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):

Loading…
Cancel
Save