From 68a4f4d9be8f04325c43880690a59d8ecd032e02 Mon Sep 17 00:00:00 2001 From: Ivlev Denis Date: Mon, 26 Mar 2018 14:02:39 +0300 Subject: [PATCH] Fix INSTAGRAM_RESULTS_PATH --- apps/content/tasks.py | 2 +- project/settings.py | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/apps/content/tasks.py b/apps/content/tasks.py index ad2699ce..f80a10cb 100644 --- a/apps/content/tasks.py +++ b/apps/content/tasks.py @@ -21,7 +21,7 @@ def retrieve_photos(): client_secret=config.INSTAGRAM_CLIENT_SECRET, ) recent_media, next_ = api.user_recent_media(user_id='self', count=20) - path = os.path.join(settings.BASE_DIR, config.INSTAGRAM_RESULTS_PATH) + path = os.path.join(settings.BASE_DIR, settings.INSTAGRAM_RESULTS_PATH) for idx, media in enumerate(recent_media): try: fname = os.path.join(path, f'{idx}.jpg') diff --git a/project/settings.py b/project/settings.py index 472f3da2..061ff429 100644 --- a/project/settings.py +++ b/project/settings.py @@ -258,6 +258,8 @@ RAVEN_CONFIG = { 'release': raven.fetch_git_sha(BASE_DIR), } +INSTAGRAM_RESULTS_PATH = 'media/instagram/results/' + try: from .local_settings import * except ImportError: