diff --git a/GeoffreyApp/models.py b/GeoffreyApp/models.py index 88378be..b80fff9 100644 --- a/GeoffreyApp/models.py +++ b/GeoffreyApp/models.py @@ -226,6 +226,8 @@ class Location(models.Model): return self.publicfarm elif hasattr(self, "market"): return self.market + elif hasattr(self, "attraction"): + return self.attraction else: return self diff --git a/GeoffreyApp/urls.py b/GeoffreyApp/urls.py index 7b2720b..4042bd0 100644 --- a/GeoffreyApp/urls.py +++ b/GeoffreyApp/urls.py @@ -23,7 +23,7 @@ urlpatterns = [ name='GeoffreyPointOfInterestInfo'), url(r'^attraction/$', views.AttractionList.as_view(), name='GeoffreyAttraction'), url(r'^attraction/(?P[0-9]{1,9})/$', views.AttractionInfo.as_view(), - name='AttractionInfo'), + name='GeoffreyAttractionInfo'), path('api/', include('GeoffreyApp.api.urls')), ]