summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorluxagraf@c63593aa-01b0-44d9-8516-4b9c7e931d7f <luxagraf@c63593aa-01b0-44d9-8516-4b9c7e931d7f>2010-08-25 17:58:57 +0000
committerluxagraf@c63593aa-01b0-44d9-8516-4b9c7e931d7f <luxagraf@c63593aa-01b0-44d9-8516-4b9c7e931d7f>2010-08-25 17:58:57 +0000
commitdf92e7882304e6b20969e06059b93b5ef36b6260 (patch)
tree8e15fcc1e05d620891f7185463c5c5e2f37310e8 /apps
parentc560a0656eb5c35f001e1c9d1f4b62ba7c287965 (diff)
fixed bug in photo retriever
Diffstat (limited to 'apps')
-rw-r--r--apps/photos/models.py6
-rw-r--r--apps/photos/retriever.py5
2 files changed, 6 insertions, 5 deletions
diff --git a/apps/photos/models.py b/apps/photos/models.py
index 074016a..5766e19 100644
--- a/apps/photos/models.py
+++ b/apps/photos/models.py
@@ -156,11 +156,7 @@ class Photo(models.Model):
def comment_period_open(self):
return self.enable_comments and datetime.datetime.today() - datetime.timedelta(30) <= self.pub_date
- def save(self):
- self.slideshowimage_width = self.get_width
- self.slideshowimage_height = self.get_height
- self.slideshowimage_margintop = self.get_margin_top
- self.slideshowimage_marginleft = self.get_margin_left
+ def save(self, *args, **kwargs):
super(Photo, self).save()
class PhotoGallery(models.Model):
diff --git a/apps/photos/retriever.py b/apps/photos/retriever.py
index 137fe9f..f7114fd 100644
--- a/apps/photos/retriever.py
+++ b/apps/photos/retriever.py
@@ -173,6 +173,10 @@ def slideshow_image(photo):
else:
filename = '%s/%s.jpg' %(slide_dir, photo.flickr_id)
img.save(filename)
+ photo.slideshowimage_width = photo.get_width
+ photo.slideshowimage_height = photo.get_height
+ photo.slideshowimage_margintop = photo.get_margin_top
+ photo.slideshowimage_marginleft = photo.get_margin_left
def make_local_copies(photo):
orig_dir = settings.IMAGES_ROOT + '/flickr/full/'+ photo.pub_date.strftime("%Y")
@@ -206,6 +210,7 @@ def make_local_copies(photo):
local_med = '%s/%s.jpg' %(med_dir, photo.flickr_id)
img.save(local_med)
+
def make_gallery_thumb(photo,set):
crop_dir = settings.IMAGES_ROOT + '/gallery_thumbs/'