Project

General

Profile

0001-use-config_example.py-if-existing-to-allow-quickstar.patch

Frédéric Péters, 17 October 2014 02:53 PM

Download (1.16 KB)

View differences:

Subject: [PATCH] use config_example.py (if existing) to allow quickstart
 (#5752)

 manage.py | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
manage.py
18 18
        else:
19 19
            break
20 20
    if not config_file:
21
        print >>sys.stderr, 'ERR: No configuration file specified, use --config=/path/to/config.py'
22
        sys.exit(1)
21
        if os.path.exists('config_example.py'):
22
            print >>sys.stderr, 'ERR: No configuration file specified, use --config=/path/to/config.py'
23
            print >>sys.stderr, '     Using config_example.py for quickstart.'
24
            config_file = 'config_example.py'
25
        else:
26
            print >>sys.stderr, 'ERR: No configuration file specified, use --config=/path/to/config.py'
27
            sys.exit(1)
23 28

  
24 29
    os.environ['DJANGO_CONFIG_FILE'] = config_file
25 30
    if multitenant:
26
-