From cd9c048458afce1198276e5936bf583578855a4f Mon Sep 17 00:00:00 2001 From: Raphael Michel Date: Mon, 20 Jul 2015 10:49:39 +0200 Subject: [PATCH] Refs #80 -- Default to DEBUG=True when using the development server --- src/pretix/settings.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/pretix/settings.py b/src/pretix/settings.py index 32ed5bdef..5b256df96 100644 --- a/src/pretix/settings.py +++ b/src/pretix/settings.py @@ -1,5 +1,6 @@ import configparser import os +import sys from django.contrib.messages import constants as messages # NOQA from django.utils.crypto import get_random_string @@ -36,7 +37,8 @@ else: # Adjustable settings -DEBUG = TEMPLATE_DEBUG = config.getboolean('django', 'debug', fallback=False) +debug_fallback = "runserver" in sys.argv +DEBUG = TEMPLATE_DEBUG = config.getboolean('django', 'debug', fallback=debug_fallback) DATABASES = { 'default': {