Python - How to import 'csrf_protect' -- django

Import csrf_protect

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

from django.views.decorators.csrf import csrf_protect

 

For more information about csrf_protect:
django csrf_protect