summaryrefslogtreecommitdiff
path: root/app/locations/models.py
diff options
context:
space:
mode:
Diffstat (limited to 'app/locations/models.py')
-rw-r--r--app/locations/models.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/app/locations/models.py b/app/locations/models.py
index a56299e..b4ee2af 100644
--- a/app/locations/models.py
+++ b/app/locations/models.py
@@ -129,6 +129,12 @@ class Location(models.Model):
def __str__(self):
return self.name
+ def comma_name(self):
+ if self.state.country.name == "United States":
+ return self.state
+ else:
+ return self.state.country
+
def get_absolute_url(self):
return "/locations/%s/%s/%s/" % (self.state.country.slug, self.state.slug, self.slug)