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.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/app/photos/models.py b/app/photos/models.py
index ada9069..c2d77e4 100644
--- a/app/photos/models.py
+++ b/app/photos/models.py
@@ -99,7 +99,10 @@ class LuxGallery(models.Model):
return "%sgallery_thumbs/%s.jpg" % (settings.IMAGES_URL, self.id)
def get_absolute_url(self):
- return "/photos/galleries/%s/" % (self.slug)
+ if self.is_public:
+ return "/photos/galleries/%s" % (self.slug)
+ else:
+ return "/photos/galleries/private/%s" % (self.slug)
class Photo(models.Model):