summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/photos/models.py6
-rw-r--r--app/photos/retriever.py6
2 files changed, 7 insertions, 5 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()
diff --git a/app/photos/retriever.py b/app/photos/retriever.py
index 959b908..4dfbc49 100644
--- a/app/photos/retriever.py
+++ b/app/photos/retriever.py
@@ -134,9 +134,9 @@ def get_photos_in_set(flickr_photoset, photoset):
p = Photo.objects.get(flickr_id__exact=str(photo['id']))
except ObjectDoesNotExist:
p = get_photo(photo)
- print p.title
- photoset.photos.add(p)
- slideshow_image(p, 1000, 800, 95)
+ if p.is_public == True:
+ photoset.photos.add(p)
+ slideshow_image(p, 1000, 800, 95)
################################################