Opraveny vadné odkazy v adminu?

This commit is contained in:
Jonas Havelka 2021-09-02 14:47:13 +02:00
parent c51b58b7db
commit 0042ed862c

View file

@ -44,15 +44,15 @@ class SeminarModelBase(models.Model):
def verejne(self):
return False
def get_absolute_url(self):
return self.verejne_url() # TODO "absolute"
# def get_absolute_url(self):
# return self.verejne_url() # TODO "absolute"
def admin_url(self):
model_name = self.__class__.__name__.lower()
return reverse('admin:seminar_{}_change'.format(model_name), args=(self.id, ))
def verejne_url(self):
return None
# def verejne_url(self):
# return None
@reversion.register(ignore_duplicates=True)
class Osoba(SeminarModelBase):
@ -642,7 +642,7 @@ class Cislo(SeminarModelBase):
def posli_cislo_mailem(self):
# parametry e-mailu
odkaz = self.get_absolute_url()
odkaz = self.verejne_url()
poslat_z_mailu = 'zadani@mam.mff.cuni.cz'
predmet = 'Vyšlo číslo {}'.format(self.kod())