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

Solution: Import the 'FileResponse' module

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

from django.http import FileResponse

 

For more information:
Python django FileResponse