From 0ac19e5bd9126b40db3b318495dd0d4be5d2802d Mon Sep 17 00:00:00 2001 From: Jimmy White Date: Thu, 9 Jan 2020 02:24:32 +0800 Subject: [PATCH 1/2] use data_account for api/account call --- bentodev/cli.py | 2 +- bentodev/utils/command_functions.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/bentodev/cli.py b/bentodev/cli.py index 0d7fbfb..c7541f0 100755 --- a/bentodev/cli.py +++ b/bentodev/cli.py @@ -72,7 +72,7 @@ def start(account, data_account): """Begin running the development server""" token = get_token() if account: - repo = get_theme(token, account) + repo = get_theme(token, account, data_account) run_flask(account, repo, data_account) else: list_accounts(token, ListFlags.START) diff --git a/bentodev/utils/command_functions.py b/bentodev/utils/command_functions.py index 1dd30dd..9b1d54a 100755 --- a/bentodev/utils/command_functions.py +++ b/bentodev/utils/command_functions.py @@ -40,9 +40,9 @@ def set_user_settings(): return user_settings -def get_theme(token, account): +def get_theme(token, account, data_account=None): kwargs = { - 'account': account, + 'account': data_account if data_account else account, 'help': True, 'token': token } From e101df956f2b0831ce4d76e946671a911535c906 Mon Sep 17 00:00:00 2001 From: Jimmy White Date: Thu, 9 Jan 2020 02:43:45 +0800 Subject: [PATCH 2/2] remove IMGIX from resize, raw url generators --- bentodev/utils/image_utils.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/bentodev/utils/image_utils.py b/bentodev/utils/image_utils.py index 134ad47..c75c50b 100644 --- a/bentodev/utils/image_utils.py +++ b/bentodev/utils/image_utils.py @@ -73,7 +73,7 @@ def generate_resize_url(source, width=1200, height=None, fit='max'): if height: params += "&h=%i" % int(height) - url = '%s%s?%s' % (IMGIX_URL, source, params) + url = '%s?%s' % (source, params) return url @@ -81,5 +81,4 @@ def generate_resize_url(source, width=1200, height=None, fit='max'): def get_raw_image_url(source): source = get_base_source(source) - url = '%s%s' % (IMGIX_URL, source) - return url + return source