2024-02-02 01:58:59 +01:00
|
|
|
__all__ = (
|
2024-03-27 14:24:39 +01:00
|
|
|
'htmx_partial',
|
2024-02-02 01:58:59 +01:00
|
|
|
)
|
|
|
|
|
|
|
|
PAGE_CONTAINER_ID = 'page-content'
|
|
|
|
|
|
|
|
|
2024-03-27 14:24:39 +01:00
|
|
|
def htmx_partial(request):
|
2024-02-02 01:58:59 +01:00
|
|
|
"""
|
2024-03-27 14:24:39 +01:00
|
|
|
Determines whether to render partial (versus complete) HTML content
|
|
|
|
in response to an HTMX request, based on the target element.
|
2024-02-02 01:58:59 +01:00
|
|
|
"""
|
|
|
|
return request.htmx and request.htmx.target != PAGE_CONTAINER_ID
|