django.core.exceptions.ImproperlyConfigured: WSGI application 'application' could not be loaded

I used a middleware CorsMiddleware but forget to install it so after install, it works perfectly.

pip install django-cors-headers.

So check something like it you may miss something like it.


Go to django-ex/project/settings.py

Change the line in settings.py as below

WSGI_APPLICATION = 'application' to WSGI_APPLICATION = 'wsgi.application'

That's it :(


If you run django project locally for development, just remove WSGI_APPLICATION variable from settings.py module. It needs in prod/stage settings, for example settings_prod.py