I'm logged in. why display NOT LOGIN! in html?
VIEWS
from django.contrib.auth.mixins import LoginRequiredMixin
class UserHomeView(LoginRequiredMixin, ListView):
model = User
template_name = 'users/users_index.html'
paginate_by = 10
context_object_name = 'user'
def get_context_data(self, *, object_list=None, **kwargs):
context = super().get_context_data(**kwargs)
return context
HTML
{% if user.is_authenticated %}
LOGIN!
{% else %}
NOT LOGIN!
{% endif %}
setting.py
LOGIN_URL = '/users/login/'