Import os Import SYS IF __name__ == " __main__ " : # Django will set a key to global large dictionary when you start the path string value is exposed to the user's profile os.environ.setdefault ( " DJANGO_SETTINGS_MODULE " , " day54.settings " ) Import Django django.setup () from app01 Import Models models.Book.objects.all () # increased