new_contents: # -*- coding: utf-8 -*-
  from django.contrib.auth import REDIRECT_FIELD_NAME
  from django.contrib.auth.decorators import user_passes_test
  
  def login_forbidden(function=None, redirect_field_name=REDIRECT_FIELD_NAME, login_url=None):
      """
      Decorator for views that checks that the user is logged in, redirecting
      to the log-in page if necessary.
      """
      actual_decorator = user_passes_test(
          lambda u: u.is_anonymous(),
          login_url=login_url,
          redirect_field_name=redirect_field_name
      )
      if function:
          return actual_decorator(function)
      return actual_decorator
  
  
subject: add login_forbidden on menuItems