forked from expo/troggle
Change absolute url for caves to there expoweb url, such that links work
This commit is contained in:
parent
0183f94780
commit
d3fb0352be
@ -384,14 +384,15 @@ class Cave(TroggleModel):
|
|||||||
return "%s-%s" % (self.kat_area(), self.unofficial_number)
|
return "%s-%s" % (self.kat_area(), self.unofficial_number)
|
||||||
|
|
||||||
def get_absolute_url(self):
|
def get_absolute_url(self):
|
||||||
if self.kataster_number:
|
return urlparse.urljoin(settings.URL_ROOT, self.url)
|
||||||
href = self.kataster_number
|
#if self.kataster_number:
|
||||||
elif self.unofficial_number:
|
# href = self.kataster_number
|
||||||
href = self.unofficial_number
|
#elif self.unofficial_number:
|
||||||
else:
|
# href = self.unofficial_number
|
||||||
href = official_name.lower()
|
#else:
|
||||||
#return settings.URL_ROOT + '/cave/' + href + '/'
|
# href = official_name.lower()
|
||||||
return urlparse.urljoin(settings.URL_ROOT, reverse('cave',kwargs={'cave_id':href,}))
|
##return settings.URL_ROOT + '/cave/' + href + '/'
|
||||||
|
#return urlparse.urljoin(settings.URL_ROOT, reverse('cave',kwargs={'cave_id':href,}))
|
||||||
|
|
||||||
def __unicode__(self):
|
def __unicode__(self):
|
||||||
if self.kataster_number:
|
if self.kataster_number:
|
||||||
|
Loading…
Reference in New Issue
Block a user