Python - How to import 'login_required' -- django

Import login_required

To import login_required, Add the following line to the top of your code.

from django.contrib.auth.decorators import login_required

 

For more information about login_required:
django login_required