summaryrefslogtreecommitdiff
path: root/megapixels/app
diff options
context:
space:
mode:
authorJules Laplace <julescarbon@gmail.com>2019-03-14 02:50:24 +0100
committerJules Laplace <julescarbon@gmail.com>2019-03-14 02:50:24 +0100
commitc826165945096a90902bb7a31db72eb0670ab388 (patch)
tree7d4fd76f427468b8be3148c6b8fe4c70ec1d718a /megapixels/app
parent8df493f6f9d18acfe5919cf257c2da0d2b30ab7a (diff)
parent26646e6adf3833f6282e9515c14ad61e485440c0 (diff)
rebuild and add compare-csv-counts.py script
Diffstat (limited to 'megapixels/app')
-rw-r--r--megapixels/app/settings/app_cfg.py5
-rw-r--r--megapixels/app/site/parser.py3
2 files changed, 8 insertions, 0 deletions
diff --git a/megapixels/app/settings/app_cfg.py b/megapixels/app/settings/app_cfg.py
index 891ab503..f6d0a7df 100644
--- a/megapixels/app/settings/app_cfg.py
+++ b/megapixels/app/settings/app_cfg.py
@@ -175,3 +175,8 @@ DIR_SITE_FINAL_CITATIONS = "../site/datasets/final/"
# -----------------------------------------------------------------------------
CELERY_BROKER_URL = 'redis://localhost:6379/0'
CELERY_RESULT_BACKEND = 'redis://localhost:6379/0'
+
+# -----------------------------------------------------------------------------
+# Build settings
+# -----------------------------------------------------------------------------
+BUILD_RESEARCH = False \ No newline at end of file
diff --git a/megapixels/app/site/parser.py b/megapixels/app/site/parser.py
index 79093bc7..00470e4b 100644
--- a/megapixels/app/site/parser.py
+++ b/megapixels/app/site/parser.py
@@ -292,6 +292,9 @@ def parse_research_index(research_posts):
content = "<div class='research_index'>"
for post in research_posts:
print(post)
+ if 'path' not in post:
+ print("No path attribute for post")
+ return ""
s3_path = s3.make_s3_path(cfg.S3_SITE_PATH, post['path'])
if 'image' in post:
post_image = s3_path + post['image']