The scenario is,
I cloned the Django code for OpenShift-V3 from here . When I run the code using python manage.py runserver
getting an error as,
django.core.exceptions.ImproperlyConfigured: WSGI application 'application' could not be loaded; Error importing module: 'application doesn't look like a module path
I didn't add anything to the code and the required packages are already satisfied.
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
Do you have Django Debug Toolbar
Remove it and check if the problem goes away. Possible occurences:
Go to django-ex/project/settings.py
Change the line in settings.py as below
WSGI_APPLICATION = 'application'
toWSGI_APPLICATION = 'wsgi.application'
That's it :(
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.
note that any error in importing modules anywhere prior to starting the wsgi application will also prompt this message, so first look at the trace and start from the top in fixing issues.
I ported a Django app from python 2.7 to python3 and add all sorts of module import issues, not connected to this issue directly.
Make sure you are in desired python Environment
Install all the Modules and you shall be good to go.