:py:mod:`checks` ============================ .. autoapi-nested-parse:: Django system checks for hx-requests. These surface configuration mistakes at startup / ``manage.py check`` rather than as silent runtime surprises. Functions ~~~~~~~~~ .. autoapisummary:: hx_requests.checks.check_auth_mixin_ordering :py:mod:`check_auth_mixin_ordering` ----------------------------------- .. py:function:: check_auth_mixin_ordering(app_configs, **kwargs) Warn when a Django auth mixin (any ``AccessMixin`` subclass -- ``LoginRequiredMixin``, ``PermissionRequiredMixin``, ``UserPassesTestMixin``) is listed *after* ``HtmxViewMixin`` in a view's base classes. ``HtmxViewMixin.dispatch`` hands HTMX requests off to the resolved ``HxRequest`` without calling ``super().dispatch()``, so any auth mixin ordered after it never runs on the HTMX path -- authentication is silently skipped for HTMX requests with no error. Auth mixins must come *before* ``HtmxViewMixin`` so their ``dispatch`` runs first (or authorization must be enforced per-handler on the ``HxRequest``). Best effort: only view classes that have been imported are visible via ``__subclasses__``; this catches the common case at startup.