安装django-cors-headers模块
- 方法1::
pip install django-cors-headers
- 方法2:下载whl文件
1
2
3https://files.pythonhosted.org/packages/1b/fb/dcf38c17126eaeb926f4febb7b6eba0754eb841b1efd62949dde471498c3/django_cors_headers-2.5.1-py2.py3-none-any.whl
pip install django_cors_headers-2.5.1-py2.py3-none-any.whl
修改Django settings.py配置文件
1 | INSTALLED_APPS = [ |
参考博客: https://blog.csdn.net/yandenghong123/article/details/79703082