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

Erorr: name 'HttpResponse' is not defined

NameError: name 'HttpResponse' is not defined

Solution: name 'HttpResponse' is not defined

# Add the following line to the top of your code
from django.http import HttpResponse

 

For more information:
Django HttpResponse