From c145919877f092c89ca7b27616c2639f2ba9b044 Mon Sep 17 00:00:00 2001 From: bakatrouble Date: Wed, 24 May 2023 18:05:35 +0300 Subject: [PATCH] change debug detection --- autoindex.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autoindex.py b/autoindex.py index 659a532..5d8f383 100644 --- a/autoindex.py +++ b/autoindex.py @@ -13,7 +13,7 @@ from sanic_ext import Extend from utils import get_j2env, get_sort_icon, get_sort_link, resolve_path, list_dir -DEBUG = environ.get('ENV', '').upper() != 'PRODUCTION' +DEBUG = Path('.debug').exists() app = Sanic('autoindex', strict_slashes=True) Extend(app)