{% extends "base.html" %} {% block title %}Dashboard – django-login-default{% endblock %} {% block content %}

Dashboard

You're logged in as {{ user.username }}. This page is only visible to authenticated users.
Why is this page protected?

DashboardView is a plain TemplateView — it doesn't use NoLoginRequiredMixin or @no_login_required. With the middleware active, that's all it takes to require login.

class DashboardView(TemplateView):
    template_name = "django_login_default/dashboard.html"

If you log out and try to come back here, you'll be redirected to the login page with ?next=/dashboard/ so you end up right back after logging in.

Visit Public Page →
{% csrf_token %}
{% endblock %}