aboutsummaryrefslogtreecommitdiffstats
path: root/bn_django
diff options
context:
space:
mode:
authorbnewbold <bnewbold@robocracy.org>2010-10-25 19:47:20 +0000
committerbnewbold <bnewbold@robocracy.org>2010-10-25 19:47:20 +0000
commit5ad5f170d4fc9b62d10a4be46991e8b59667443d (patch)
treeaa1217e2f0a1b1ff94acc12d111cfd7971512572 /bn_django
parent1ad7cb33abfac55a9be2f1d889c369fd1b43df2f (diff)
downloadbnewnet-5ad5f170d4fc9b62d10a4be46991e8b59667443d.tar.gz
bnewnet-5ad5f170d4fc9b62d10a4be46991e8b59667443d.zip
fixed photo full url paths (still a hack)
Diffstat (limited to 'bn_django')
-rw-r--r--bn_django/photos/models.py5
1 files changed, 4 insertions, 1 deletions
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):