{% load static %} {% if request.user.is_staff %} {# Empty unless the project mounted wagtail_mcp.agent.urls. #} {% url 'wagtail_mcp_agent:endpoint' as agent_endpoint %} {% if agent_endpoint %}