Get whether debug mode should be enabled for the app, indicated by the :envvar:`FLASK_DEBUG` environment variable. The default is ``False``.
()
| 26 | |
| 27 | |
| 28 | def get_debug_flag() -> bool: |
| 29 | """Get whether debug mode should be enabled for the app, indicated by the |
| 30 | :envvar:`FLASK_DEBUG` environment variable. The default is ``False``. |
| 31 | """ |
| 32 | val = os.environ.get("FLASK_DEBUG") |
| 33 | return bool(val and val.lower() not in {"0", "false", "no"}) |
| 34 | |
| 35 | |
| 36 | def get_load_dotenv(default: bool = True) -> bool: |