diff --git a/core/models.py b/core/models.py index 1c08a25..d199073 100644 --- a/core/models.py +++ b/core/models.py @@ -384,14 +384,15 @@ class Cave(TroggleModel): return "%s-%s" % (self.kat_area(), self.unofficial_number) def get_absolute_url(self): - if self.kataster_number: - href = self.kataster_number - elif self.unofficial_number: - href = self.unofficial_number - else: - href = official_name.lower() - #return settings.URL_ROOT + '/cave/' + href + '/' - return urlparse.urljoin(settings.URL_ROOT, reverse('cave',kwargs={'cave_id':href,})) + return urlparse.urljoin(settings.URL_ROOT, self.url) + #if self.kataster_number: + # href = self.kataster_number + #elif self.unofficial_number: + # href = self.unofficial_number + #else: + # href = official_name.lower() + ##return settings.URL_ROOT + '/cave/' + href + '/' + #return urlparse.urljoin(settings.URL_ROOT, reverse('cave',kwargs={'cave_id':href,})) def __unicode__(self): if self.kataster_number: