How to Solve NameError: name 'format_html' is not defined -- django

Solution: Import the 'format_html' module

To Solve the error, add the following line to the top of your code.

from django.utils.html import format_html

 

For more information:
Python django format_html