MCPcopy Create free account
hub / github.com/django-commons/django-debug-toolbar / is_processable_html_response

Function is_processable_html_response

debug_toolbar/utils.py:396–403  ·  view source on GitHub ↗
(response)

Source from the content-addressed store, hash-verified

394
395
396def is_processable_html_response(response):
397 content_encoding = response.get("Content-Encoding", "")
398 content_type = response.get("Content-Type", "").split(";")[0]
399 return (
400 not getattr(response, "streaming", False)
401 and content_encoding == ""
402 and content_type in _HTML_TYPES
403 )
404
405
406def get_csp_nonce(request) -> str | None:

Callers 2

_postprocessMethod · 0.90
generate_statsMethod · 0.90

Calls 1

getMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…