You need access

{% try %}{% set xsrf = handler.check_xsrf_cookie() or True %}{% except %}{% set xsrf = False %}{% end %} {% set login_url = None %} {% try %}{% set login_url = handler.kwargs.auth.login_url %}{% except %} {% try %}{% import gramex %}{% set login_url = gramex.conf.app.settings.login_url %}{% except %}{% end %} {% end %} {% if handler.request.method not in {'GET', 'HEAD', 'OPTIONS'} and not xsrf %}

Your app sent a {{ handler.request.method }} request without an XSRF cookie.

{% elif handler.current_user %}

You are logged in, but as a user that cannot access this page.

{% import yaml %}
{{ yaml.safe_dump(handler.current_user, default_flow_style=False) }}
{% if login_url %}

Try logging in again.

{% end %} {% else %}

You are not logged in.

{% if login_url %}

Try logging in.

{% end %} {% end %}

Contact the app owner for more information.

{% set exception = kwargs['exc_info'][1] %} {% for key, val in vars(exception).items() %} {% if val %} {% end %} {% end %}
{{ key.replace('_', ' ').title() }}{{ val }}