From d689e3042bb7aaba6cd6db153be0b9417f3b0520 Mon Sep 17 00:00:00 2001 From: Tomas Gavenciak Date: Tue, 26 May 2015 10:11:55 +0200 Subject: [PATCH] Uprava pudlic_url --- seminar/models.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/seminar/models.py b/seminar/models.py index e601b807..c5a7cf44 100644 --- a/seminar/models.py +++ b/seminar/models.py @@ -29,11 +29,14 @@ class SeminarModelBase(models.Model): def verejne(self): return False - def public_url(self): - if self.Meta.url_name: - return reverse(self.Meta.url_name, - kwargs={'id': self.id, 'pk': self.id}) - return None +# def public_url(self): +# if self.Meta.url_name: +# return reverse(self.Meta.url_name, +# kwargs={'id': self.id, 'pk': self.id}) +# return None + + def get_absolute_url(self): + return self.verejne_url() # TODO "absolute" def admin_url(self): model_name = self.__class__.__name__.lower()