summaryrefslogtreecommitdiff
path: root/app/photos/models.py
diff options
context:
space:
mode:
Diffstat (limited to 'app/photos/models.py')
-rw-r--r--app/photos/models.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/app/photos/models.py b/app/photos/models.py
index a87b60d..e64e186 100644
--- a/app/photos/models.py
+++ b/app/photos/models.py
@@ -85,6 +85,8 @@ class Photo(models.Model):
def get_original_url(self):
#return self.get_pic_url(size="original")
return "http://farm%s.static.flickr.com/%s/%s_%s_o.jpg" % (self.flickr_farm, self.flickr_server, self.flickr_id, self.flickr_originalsecret)
+ def get_retina_slideshow_url(self):
+ return '%sslideshow/%s/%sx2.jpg' %(settings.IMAGES_URL,self.pub_date.strftime("%Y"),self.flickr_id)
def has_retina(self):
return os.path.isfile('%s/slideshow/%s/%sx2.jpg' %(settings.IMAGES_ROOT,self.pub_date.strftime("%Y"),self.flickr_id))
@@ -151,8 +153,8 @@ class Photo(models.Model):
def get_tumble_image(self):
return "%s/crops/%s/%s.jpg" %(settings.IMAGES_URL, self.pub_date.strftime("%Y/%b").lower(), self.id)
-
-
+
+
def get_previous_published(self):
return self.get_previous_by_pub_date()