From bf0c5e3ed91a286b489d7b7b0bbcb4707df0fc64 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9gis=20Behmo?= Date: Wed, 19 Aug 2020 07:52:07 +0200 Subject: [PATCH] Memorize whether the user is running a production platform --- CHANGELOG.md | 4 ++++ tutor/interactive.py | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 08e7ca0..db0eb3b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ Note: Breaking changes between versions are indicated by "💥". +## Unreleased + +- [Improvement] Memorize whether the user is running a production platform during interactive configuration + ## v10.2.0 (2020-08-16) - [Bugfix] Fix incorrect loading of some resources from localhost:18000 in development diff --git a/tutor/interactive.py b/tutor/interactive.py index 8dbc661..1759f7e 100644 --- a/tutor/interactive.py +++ b/tutor/interactive.py @@ -28,12 +28,13 @@ def load_all(root, interactive=True): def ask_questions(config, defaults): + run_for_prod = config.get("LMS_HOST") != "local.overhang.io" run_for_prod = click.confirm( fmt.question( "Are you configuring a production platform? Type 'n' if you are just testing Tutor on your local computer" ), prompt_suffix=" ", - default=True, + default=run_for_prod, ) if not run_for_prod: dev_values = {