Skip to content

Commit 2092405

Browse files
committed
Allow runserver to work while debug is off
1 parent 150184c commit 2092405

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

tests/test_app/settings_multi_db.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717

1818
# Application definition
1919
INSTALLED_APPS = [
20+
"servestatic.runserver_nostatic",
2021
"daphne", # Overrides `runserver` command with an ASGI server
2122
"django.contrib.admin",
2223
"django.contrib.auth",
@@ -144,3 +145,7 @@
144145

145146
# ReactPy-Django Settings
146147
REACTPY_BACKHAUL_THREAD = any(sys.argv[0].endswith(webserver_name) for webserver_name in ["hypercorn", "uvicorn"])
148+
149+
# ServeStatic Settings
150+
SERVESTATIC_USE_FINDERS = True
151+
SERVESTATIC_AUTOREFRESH = True

tests/test_app/settings_single_db.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717

1818
# Application definition
1919
INSTALLED_APPS = [
20+
"servestatic.runserver_nostatic",
2021
"daphne", # Overrides `runserver` command with an ASGI server
2122
"django.contrib.admin",
2223
"django.contrib.auth",
@@ -130,3 +131,7 @@
130131

131132
# ReactPy-Django Settings
132133
REACTPY_BACKHAUL_THREAD = any(sys.argv[0].endswith(webserver_name) for webserver_name in ["hypercorn", "uvicorn"])
134+
135+
# ServeStatic Settings
136+
SERVESTATIC_USE_FINDERS = True
137+
SERVESTATIC_AUTOREFRESH = True

0 commit comments

Comments
 (0)