From f2825a97cf2b89c5b286eacc752b1a5561dd710b Mon Sep 17 00:00:00 2001 From: Pavel 'LEdoian' Turinsky Date: Mon, 11 Nov 2024 07:46:34 +0100 Subject: [PATCH] =?UTF-8?q?P=C5=99id=C3=A1n=C3=AD=20odkazu=20z=20Admina=20?= =?UTF-8?q?do=20korekturov=C3=A1tka?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- korektury/models.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/korektury/models.py b/korektury/models.py index 6a87f2d9..9ca40ba1 100644 --- a/korektury/models.py +++ b/korektury/models.py @@ -1,5 +1,6 @@ import os from django.db import models +from django.urls import reverse from django.utils import timezone from django.conf import settings from django.core.exceptions import ObjectDoesNotExist @@ -128,6 +129,9 @@ class KorekturovanePDF(models.Model): return nazev_split[0] # + " " + nazev_split[2] except IndexError: return self.nazev + + def get_absolute_url(self): + return reverse('korektury', kwargs={'pdf': self.id}) @reversion.register(ignore_duplicates=True) -- 2.39.5