Browse Source

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

korektury-link-z-admina
Pavel 'LEdoian' Turinsky 2 weeks ago
parent
commit
f2825a97cf
  1. 4
      korektury/models.py

4
korektury/models.py

@ -1,5 +1,6 @@
import os import os
from django.db import models from django.db import models
from django.urls import reverse
from django.utils import timezone from django.utils import timezone
from django.conf import settings from django.conf import settings
from django.core.exceptions import ObjectDoesNotExist from django.core.exceptions import ObjectDoesNotExist
@ -129,6 +130,9 @@ class KorekturovanePDF(models.Model):
except IndexError: except IndexError:
return self.nazev return self.nazev
def get_absolute_url(self):
return reverse('korektury', kwargs={'pdf': self.id})
@reversion.register(ignore_duplicates=True) @reversion.register(ignore_duplicates=True)
class Oprava(models.Model): class Oprava(models.Model):

Loading…
Cancel
Save