From 28035a6e46d8ab2cb05270f547b260162eb041e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20P=C3=A9ters?= Date: Fri, 17 Oct 2014 14:51:05 +0200 Subject: [PATCH] use config_example.py (if existing) to allow quickstart (#5752) --- manage.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/manage.py b/manage.py index ae7052c..a4e6eb9 100755 --- a/manage.py +++ b/manage.py @@ -18,8 +18,13 @@ if __name__ == "__main__": else: break if not config_file: - print >>sys.stderr, 'ERR: No configuration file specified, use --config=/path/to/config.py' - sys.exit(1) + if os.path.exists('config_example.py'): + print >>sys.stderr, 'ERR: No configuration file specified, use --config=/path/to/config.py' + print >>sys.stderr, ' Using config_example.py for quickstart.' + config_file = 'config_example.py' + else: + print >>sys.stderr, 'ERR: No configuration file specified, use --config=/path/to/config.py' + sys.exit(1) os.environ['DJANGO_CONFIG_FILE'] = config_file if multitenant: -- 2.1.1