debug_toolbar.core.config¶
Configuration system for the debug toolbar.
Classes
|
Configuration for the debug toolbar. |
- class debug_toolbar.core.config.DebugToolbarConfig(enabled=True, panels=<factory>, intercept_redirects=False, show_toolbar_callback=None, insert_before='</body>', max_request_history=50, api_path='/_debug_toolbar', static_path='/_debug_toolbar/static', allowed_hosts=<factory>, extra_panels=<factory>, exclude_panels=<factory>, memory_backend='auto', panel_display_depth=10, panel_display_max_items=100, panel_display_max_string=1000, async_profiler_backend='auto', async_blocking_threshold_ms=100.0, async_enable_blocking_detection=True, async_enable_event_loop_monitoring=True, async_event_loop_lag_threshold_ms=10.0, async_capture_task_stacks=True, async_max_stack_depth=10, websocket_tracking_enabled=True, websocket_max_connections=50, websocket_max_messages_per_connection=100, websocket_max_message_size=10240, websocket_connection_ttl=3600, storage=None)[source]¶
Configuration for the debug toolbar.
- enabled¶
Whether the toolbar is enabled. Defaults to True.
- panels¶
List of panel classes or import paths to include.
- intercept_redirects¶
Whether to intercept redirects for debugging.
- show_toolbar_callback¶
Optional callback to determine if toolbar should be shown.
- insert_before¶
HTML tag to insert toolbar before. Defaults to “</body>”.
- max_request_history¶
Maximum number of requests to store in history.
- api_path¶
URL path prefix for toolbar API endpoints.
- static_path¶
URL path prefix for static assets.
- allowed_hosts¶
List of allowed hosts. Empty list means all hosts.
- extra_panels¶
Additional panels to add beyond defaults.
- exclude_panels¶
Panel names to exclude from defaults.
- memory_backend¶
Memory profiling backend. “auto” selects best available.
- panel_display_depth¶
Max depth for nested data rendering. Defaults to 10.
- panel_display_max_items¶
Max items to show in arrays/objects. Defaults to 100.
- panel_display_max_string¶
Max string length before truncation. Defaults to 1000.
- async_profiler_backend¶
Async profiler backend. “auto” selects best available.
- async_blocking_threshold_ms¶
Threshold for blocking call detection. Defaults to 100.
- async_enable_blocking_detection¶
Whether to detect blocking calls. Defaults to True.
- async_enable_event_loop_monitoring¶
Whether to monitor event loop lag. Defaults to True.
- async_event_loop_lag_threshold_ms¶
Threshold for lag alerts. Defaults to 10.
- async_capture_task_stacks¶
Whether to capture task creation stacks. Defaults to True.
- async_max_stack_depth¶
Maximum stack depth to capture. Defaults to 10.
- websocket_tracking_enabled¶
Whether to track WebSocket connections. Defaults to True.
- websocket_max_connections¶
Maximum number of connections to track. Defaults to 50.
- websocket_max_messages_per_connection¶
Maximum messages per connection. Defaults to 100.
- websocket_max_message_size¶
Maximum message size to store in bytes. Defaults to 10240.
- websocket_connection_ttl¶
Connection time-to-live in seconds. Defaults to 3600.
-
storage:
ToolbarStorage|None= None¶
- __init__(enabled=True, panels=<factory>, intercept_redirects=False, show_toolbar_callback=None, insert_before='</body>', max_request_history=50, api_path='/_debug_toolbar', static_path='/_debug_toolbar/static', allowed_hosts=<factory>, extra_panels=<factory>, exclude_panels=<factory>, memory_backend='auto', panel_display_depth=10, panel_display_max_items=100, panel_display_max_string=1000, async_profiler_backend='auto', async_blocking_threshold_ms=100.0, async_enable_blocking_detection=True, async_enable_event_loop_monitoring=True, async_event_loop_lag_threshold_ms=10.0, async_capture_task_stacks=True, async_max_stack_depth=10, websocket_tracking_enabled=True, websocket_max_connections=50, websocket_max_messages_per_connection=100, websocket_max_message_size=10240, websocket_connection_ttl=3600, storage=None)¶