From b565762d048793bc14ff526da6d8c2e9abe76256 Mon Sep 17 00:00:00 2001 From: xenua Date: Sun, 19 Jun 2022 09:13:30 +0200 Subject: [PATCH] add scheme to the link text --- leftists/models.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/leftists/models.py b/leftists/models.py index 19e7c0a..7a8a7a5 100644 --- a/leftists/models.py +++ b/leftists/models.py @@ -1,3 +1,4 @@ +from django.conf import settings from django.db import models from django.utils.translation import gettext_lazy as _ from django_scopes import ScopedManager @@ -21,4 +22,4 @@ class ShortLink(RandomSlugPKMixin, models.Model): self.save() def link(self): - return f"{self.domain.fqdn}/{self.location}" + return f"https://{self.domain.fqdn}/{self.location}"