static: Make debug_mode for default_page_params follow the setting.

For pages that don't have page_params, the default_page_params now
ensures that debug_mode will correctly follow settings.DEBUG.

This allows blueslip exception popups to work on portico pages for
development environment.

Fixes: #17540.
This commit is contained in:
PIG208 2021-03-26 03:46:12 +08:00 committed by Tim Abbott
parent 4bdaec7a8d
commit 8dd1164979
1 changed files with 1 additions and 1 deletions

View File

@ -16,7 +16,7 @@ def environment(**options: Any) -> Environment:
env = Environment(**options)
env.globals.update(
default_page_params={
"debug_mode": False,
"debug_mode": settings.DEBUG,
"webpack_public_path": staticfiles_storage.url(
settings.WEBPACK_LOADER["DEFAULT"]["BUNDLE_DIR_NAME"],
),