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)
|
||||
|
||||
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:
|
||||
|
Loading…
Reference in New Issue
Block a user