From f79c89d928964e0c21ada42a8de10a2e25c6f540 Mon Sep 17 00:00:00 2001 From: quroom <39736691+quroom@users.noreply.github.com> Date: Wed, 17 Apr 2024 03:23:05 +0900 Subject: [PATCH] Add options to reload django when file changes in windows docker (#4971) * Add options to reload django when file changes in windows docker * Fix Reloader interval as default and make code with indent to be only in docker --- {{cookiecutter.project_slug}}/config/settings/local.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/{{cookiecutter.project_slug}}/config/settings/local.py b/{{cookiecutter.project_slug}}/config/settings/local.py index f1edb514..ab526f96 100644 --- a/{{cookiecutter.project_slug}}/config/settings/local.py +++ b/{{cookiecutter.project_slug}}/config/settings/local.py @@ -83,6 +83,15 @@ if env("USE_DOCKER") == "yes": # The node container isn't started (yet?) pass {%- endif %} + {%- if cookiecutter.windows == 'y' %} + # RunServerPlus + # ------------------------------------------------------------------------------ + # This is a custom setting for RunServerPlus to fix reloader issue in Windows docker environment + # Werkzeug reloader type [auto, watchdog, or stat] + RUNSERVERPLUS_POLLER_RELOADER_TYPE = 'stat' + # If you have CPU and IO load issues, you can increase this poller interval e.g) 5 + RUNSERVERPLUS_POLLER_RELOADER_INTERVAL = 1 + {%- endif %} {%- endif %} # django-extensions