refactor: Remove deprecated str_hr
This commit is contained in:
@@ -62,15 +62,12 @@ class Location(models.Model):
|
|||||||
if self.city and self.postcode:
|
if self.city and self.postcode:
|
||||||
return f"{self.city} ({self.postcode})"
|
return f"{self.city} ({self.postcode})"
|
||||||
else:
|
else:
|
||||||
return f"{self.name} ({self.latitude:.5}, {self.longitude:.5})"
|
return f"{self.name}"
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def position(self):
|
def position(self):
|
||||||
return (self.latitude, self.longitude)
|
return (self.latitude, self.longitude)
|
||||||
|
|
||||||
@property
|
|
||||||
def str_hr(self):
|
|
||||||
return f"{self.name.split(',')[0]}"
|
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def get_location_from_string(location_string):
|
def get_location_from_string(location_string):
|
||||||
|
@@ -14,7 +14,7 @@
|
|||||||
<p>
|
<p>
|
||||||
<b>Ort</b>
|
<b>Ort</b>
|
||||||
{% if adoption_notice.location %}
|
{% if adoption_notice.location %}
|
||||||
{{ adoption_notice.location.str_hr }}
|
{{ adoption_notice.location.str }}
|
||||||
{% else %}
|
{% else %}
|
||||||
{{ adoption_notice.location_string }}
|
{{ adoption_notice.location_string }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
@@ -11,7 +11,7 @@
|
|||||||
<p>
|
<p>
|
||||||
<b><i class="fa-solid fa-location-dot"></i></b>
|
<b><i class="fa-solid fa-location-dot"></i></b>
|
||||||
{% if rescue_organization.location %}
|
{% if rescue_organization.location %}
|
||||||
{{ rescue_organization.location.str_hr }}
|
{{ rescue_organization.location.str }}
|
||||||
{% else %}
|
{% else %}
|
||||||
{{ rescue_organization.location_string }}
|
{{ rescue_organization.location_string }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
Reference in New Issue
Block a user