From 7109f9d3b7ec1cd445919fca1e320c9757f30edb Mon Sep 17 00:00:00 2001 From: luxagraf Date: Sun, 4 Feb 2018 10:49:22 -0600 Subject: added get_latest_by to sightings --- app/sightings/models.py | 1 + 1 file changed, 1 insertion(+) diff --git a/app/sightings/models.py b/app/sightings/models.py index 096fa03..96e0b5e 100644 --- a/app/sightings/models.py +++ b/app/sightings/models.py @@ -89,6 +89,7 @@ class Sighting(models.Model): class Meta: ordering = ["-date", ] + get_latest_by = "date" @property def state(self): -- cgit v1.2.3