Permalink
Browse files

add utility method to only return active snapshots

  • Loading branch information...
1 parent 20ef2da commit 9310587ee6ffdc69f7d0bf43c918bac69fa5c754 @ekpneo ekpneo committed Aug 11, 2011
Showing with 3 additions and 0 deletions.
  1. +3 −0 geocamLens/models.py
View
@@ -146,6 +146,9 @@ class Image(coreModels.PointFeature):
class Meta:
abstract = True
+ def getActiveSnapshots(self):
+ return self.snapshot_set.filter(status=STATUS_ACTIVE)
+
def getThumbnailPath(self, width):
return os.path.join(self.getDir(), 'th%d.jpg' % width)

0 comments on commit 9310587

Please sign in to comment.