summaryrefslogtreecommitdiff
path: root/apps/photos/models.py
diff options
context:
space:
mode:
Diffstat (limited to 'apps/photos/models.py')
-rw-r--r--apps/photos/models.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/apps/photos/models.py b/apps/photos/models.py
index 9b6d331..73098b3 100644
--- a/apps/photos/models.py
+++ b/apps/photos/models.py
@@ -47,7 +47,14 @@ class Photo(models.Model):
admin_thumbnail.allow_tags = True
admin_thumbnail.short_description = 'Thumbnail'
+ def get_local_medium_url(self):
+ return '%sflickr/med/%s/%s.jpg' %(settings.IMAGES_URL,self.pub_date.strftime("%Y"),self.flickr_id)
+ def get_local_orig_url(self):
+ return '%sflickr/full/%s/%s.jpg' %(settings.IMAGES_URL,self.pub_date.strftime("%Y"),self.flickr_id)
+
+ def get_local_slideshow_url(self):
+ return '%sslideshow/%s/%s.jpg' %(settings.IMAGES_URL,self.pub_date.strftime("%Y"),self.flickr_id)
def __unicode__(self):
return self.title
@@ -139,7 +146,7 @@ class PhotoGallery(models.Model):
return "%sgallery_thumbs/%s.jpg" % (settings.IMAGES_URL, self.id)
def get_absolute_url(self):
- return "/photos/album/%s/" % (self.id)
+ return "/photos/galleries/%s/" % (self.set_slug)
class PhotoSitemap(Sitemap):