From b50778b43fba337162751a03241d84062a95cbc8 Mon Sep 17 00:00:00 2001 From: Colin Powell Date: Fri, 24 Nov 2023 15:15:20 +0100 Subject: [PATCH] Add locations to test settings --- vrobbler/apps/locations/models.py | 4 +++- vrobbler/settings-testing.py | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/vrobbler/apps/locations/models.py b/vrobbler/apps/locations/models.py index 5472a6e..83248f1 100644 --- a/vrobbler/apps/locations/models.py +++ b/vrobbler/apps/locations/models.py @@ -26,8 +26,10 @@ class GeoLocation(ScrobblableMixin): unique_together = [["lat", "lon", "altitude"]] def __str__(self): - return f"{self.lat} x {self.lon}" + if self.title: + return self.title + return f"{self.lat} x {self.lon}" def get_absolute_url(self): return reverse( diff --git a/vrobbler/settings-testing.py b/vrobbler/settings-testing.py index 9009b63..59b4306 100644 --- a/vrobbler/settings-testing.py +++ b/vrobbler/settings-testing.py @@ -106,6 +106,7 @@ INSTALLED_APPS = [ "books", "boardgames", "videogames", + "locations", "mathfilters", "rest_framework", "allauth",