Browse Source

Make Entry.get_absolute_url actually return an absolute URL, always

tags/v1.9.5
Danielle McLean 1 year ago
parent
commit
6fb289727c
Signed by: Danielle McLean <dani@00dani.me> GPG Key ID: 5A5D2D1AFF12EEC5
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      entries/models.py

+ 2
- 1
entries/models.py 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):

Loading…
Cancel
Save