diff --git a/src/fellchensammlung/models.py b/src/fellchensammlung/models.py index 1d397be..ad7a91d 100644 --- a/src/fellchensammlung/models.py +++ b/src/fellchensammlung/models.py @@ -191,6 +191,13 @@ class AdoptionNotice(models.Model): distance = geo.calculate_distance_between_coordinates(self.position, position) return distance < max_distance + @property + def link_to_more_information(self): + from urllib.parse import urlparse + + domain = urlparse(self.further_information).netloc + return f"{domain}" + diff --git a/src/fellchensammlung/templates/fellchensammlung/details/detail_adoption_notice.html b/src/fellchensammlung/templates/fellchensammlung/details/detail_adoption_notice.html index 29b60a8..7f78d5e 100644 --- a/src/fellchensammlung/templates/fellchensammlung/details/detail_adoption_notice.html +++ b/src/fellchensammlung/templates/fellchensammlung/details/detail_adoption_notice.html @@ -27,7 +27,7 @@