login is required code example Example: login required from django.contrib.auth.mixins import LoginRequiredMixin