Uprava pudlic_url
This commit is contained in:
parent
ff0aac3d57
commit
d689e3042b
1 changed files with 8 additions and 5 deletions
|
@ -29,11 +29,14 @@ class SeminarModelBase(models.Model):
|
||||||
def verejne(self):
|
def verejne(self):
|
||||||
return False
|
return False
|
||||||
|
|
||||||
def public_url(self):
|
# def public_url(self):
|
||||||
if self.Meta.url_name:
|
# if self.Meta.url_name:
|
||||||
return reverse(self.Meta.url_name,
|
# return reverse(self.Meta.url_name,
|
||||||
kwargs={'id': self.id, 'pk': self.id})
|
# kwargs={'id': self.id, 'pk': self.id})
|
||||||
return None
|
# return None
|
||||||
|
|
||||||
|
def get_absolute_url(self):
|
||||||
|
return self.verejne_url() # TODO "absolute"
|
||||||
|
|
||||||
def admin_url(self):
|
def admin_url(self):
|
||||||
model_name = self.__class__.__name__.lower()
|
model_name = self.__class__.__name__.lower()
|
||||||
|
|
Loading…
Reference in a new issue