Přidání odkazu z Admina do korekturovátka

This commit is contained in:
Pavel 'LEdoian' Turinsky 2024-11-11 07:46:34 +01:00
parent 502588fd3a
commit f2825a97cf

View file

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