summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpepperpepperpepper <pepper@scannerjammer.com>2015-11-29 18:03:28 -0800
committerpepperpepperpepper <pepper@scannerjammer.com>2015-11-29 18:03:28 -0800
commit8dfcfb320acd2cb313bd47e95ed87820bd0002ea (patch)
treeaa4bc896ca4bb9e1257db9da8e82b6b1c62c1879
parent31f6e1654e3d6f5269ce3f53a1d068050f3d7887 (diff)
finished local version
-rw-r--r--photoblaster/config.py2
-rw-r--r--photoblaster/modules/base.py5
2 files changed, 5 insertions, 2 deletions
diff --git a/photoblaster/config.py b/photoblaster/config.py
index 698927f..b4ad22e 100644
--- a/photoblaster/config.py
+++ b/photoblaster/config.py
@@ -1,6 +1,6 @@
import os
LOCAL = True
-if os.environ["PB_PRODUCTION"]:
+if os.environ.get("PB_PRODUCTION"):
LOCAL = False
diff --git a/photoblaster/modules/base.py b/photoblaster/modules/base.py
index dcb6a89..ada2504 100644
--- a/photoblaster/modules/base.py
+++ b/photoblaster/modules/base.py
@@ -211,8 +211,11 @@ class Pb(object):
self._file_clean_local()
def file_dict(self):
+ url = "%s/im/%s/%s" % (BASE_URL, self._hashdir, self.filename)
+ if LOCAL:
+ url = "/im/cache/%s" % self.filename
return {
- 'url': "%s/im/%s/%s" % (BASE_URL, self._hashdir, self.filename),
+ 'url': url,
'size': self.file_size,
'width': "%spx" % self.file_width,
'height': "%spx" % self.file_height,