summaryrefslogtreecommitdiff
path: root/app/birds/models.py
diff options
context:
space:
mode:
Diffstat (limited to 'app/birds/models.py')
-rw-r--r--app/birds/models.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/app/birds/models.py b/app/birds/models.py
index 05a1159..81e0ca7 100644
--- a/app/birds/models.py
+++ b/app/birds/models.py
@@ -120,6 +120,12 @@ class BirdSighting(models.Model):
'''Get the site's latitude.'''
return self.point.y
+ def get_small_image(self):
+ for img in self.images.all():
+ for size in img.sizes.all():
+ if size.width > 360 and size.width < 700:
+ return img.get_image_by_size(size)
+
def __str__(self):
return self.bird.common_name