When I try configure the django in my local, I got this error ImproperlyConfigured: Error importing module corsheaders.middleware: “No module named corsheaders.middleware” to solve this error we need to install django-cors-headers
Traceback (most recent call last): File "/usr/lib/python2.7/wsgiref/handlers.py", line 85, in run self.result = application(self.environ, self.start_response) File "/usr/lib/python2.7/dist-packages/django/contrib/staticfiles/handlers.py", line 67, in __call__ return self.application(environ, start_response) File "/usr/lib/python2.7/dist-packages/django/core/handlers/wsgi.py", line 187, in __call__ self.load_middleware() File "/usr/lib/python2.7/dist-packages/django/core/handlers/base.py", line 45, in load_middleware mw_class = import_by_path(middleware_path) File "/usr/lib/python2.7/dist-packages/django/utils/module_loading.py", line 26, in import_by_path sys.exc_info()[2]) File "/usr/lib/python2.7/dist-packages/django/utils/module_loading.py", line 21, in import_by_path module = import_module(module_path) File "/usr/lib/python2.7/dist-packages/django/utils/importlib.py", line 40, in import_module __import__(name) ImproperlyConfigured: Error importing module corsheaders.middleware: "No module named corsheaders.middleware"
Install django-cors-headers in Ubuntu
pip install django-cors-headers