From 5ad5f170d4fc9b62d10a4be46991e8b59667443d Mon Sep 17 00:00:00 2001 From: bnewbold Date: Mon, 25 Oct 2010 19:47:20 +0000 Subject: fixed photo full url paths (still a hack) --- bn_django/photos/models.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'bn_django') diff --git a/bn_django/photos/models.py b/bn_django/photos/models.py index 346e19d..4964467 100644 --- a/bn_django/photos/models.py +++ b/bn_django/photos/models.py @@ -149,7 +149,10 @@ class Photo(models.Model): return os.path.join(settings.MEDIA_ROOT, self.image.name) def fullurl(self): - return STOCKPHOTO_URL + '/' + self.image.name + if(self.image.name.startswith("photos/")): + return STOCKPHOTO_URL + '/' + self.image.name[7:] + else: + return STOCKPHOTO_URL + '/' + self.image.name def next(self): -- cgit v1.2.3