Merge pull request 'Korektury Link Z Admina' (!72) from korektury-link-z-admina into master
Reviewed-on: #72
This commit is contained in:
commit
dbe8c39b37
1 changed files with 4 additions and 0 deletions
|
@ -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
|
||||||
|
@ -128,6 +129,9 @@ class KorekturovanePDF(models.Model):
|
||||||
return nazev_split[0] # + " " + nazev_split[2]
|
return nazev_split[0] # + " " + nazev_split[2]
|
||||||
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)
|
||||||
|
|
Loading…
Reference in a new issue