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

Solution: Import the 'get_app' module

# Add the following line to the top of your code
from django.db.models.loading import get_app

 

For more information:
django get_app