diff options
author | bnewbold <bnewbold@robocracy.org> | 2010-10-25 19:47:20 +0000 |
---|---|---|
committer | bnewbold <bnewbold@robocracy.org> | 2010-10-25 19:47:20 +0000 |
commit | 5ad5f170d4fc9b62d10a4be46991e8b59667443d (patch) | |
tree | aa1217e2f0a1b1ff94acc12d111cfd7971512572 | |
parent | 1ad7cb33abfac55a9be2f1d889c369fd1b43df2f (diff) | |
download | bnewnet-5ad5f170d4fc9b62d10a4be46991e8b59667443d.tar.gz bnewnet-5ad5f170d4fc9b62d10a4be46991e8b59667443d.zip |
fixed photo full url paths (still a hack)
-rw-r--r-- | bn_django/photos/models.py | 5 |
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): |