Odstrel Modelu Odevzdavatko #64
2 changed files with 3 additions and 6 deletions
|
@ -14,8 +14,9 @@ class SeminarModelBase(models.Model):
|
||||||
# return "https://" + str(get_current_site(None)) + self.verejne_url()
|
# return "https://" + str(get_current_site(None)) + self.verejne_url()
|
||||||
|
|
||||||
def admin_url(self):
|
def admin_url(self):
|
||||||
model_name = self.__class__.__name__.lower()
|
app_name = self._meta.app_label
|
||||||
return reverse('admin:seminar_{}_change'.format(model_name), args=(self.id, ))
|
model_name = self._meta.model_name
|
||||||
|
return reverse('admin:{}_{}_change'.format(app_name, model_name), args=(self.id, ))
|
||||||
|
|
||||||
# def verejne_url(self):
|
# def verejne_url(self):
|
||||||
# return None
|
# return None
|
||||||
|
|
|
@ -77,10 +77,6 @@ class Soustredeni(SeminarModelBase):
|
||||||
#return reverse('seminar_soustredeni', kwargs={'pk': self.id})
|
#return reverse('seminar_soustredeni', kwargs={'pk': self.id})
|
||||||
return reverse('seminar_seznam_soustredeni')
|
return reverse('seminar_seznam_soustredeni')
|
||||||
|
|
||||||
def admin_url(self):
|
|
||||||
model_name = self.__class__.__name__.lower()
|
|
||||||
return reverse('admin:soustredeni_{}_change'.format(model_name), args=(self.id, ))
|
|
||||||
|
|
||||||
|
|
||||||
@reversion.register(ignore_duplicates=True)
|
@reversion.register(ignore_duplicates=True)
|
||||||
class Soustredeni_Ucastnici(SeminarModelBase):
|
class Soustredeni_Ucastnici(SeminarModelBase):
|
||||||
|
|
Loading…
Reference in a new issue