$ pip install django-cors-headers
project/settings.pyを編集
INSTALLED_APPS = [
...
'corsheaders'
]
MIDDLEWARE = [
'corsheaders.middleware.CorsMiddleware',
...
]
ALLOWD_HOST = ['*']
CORS_ORIGIN_ALLOW_ALL = True
$ sudo npm install -g vue-cli
$ vue init webpack test-project
CentOS,Ubuntuに最新のnodejs, npmを入れる手順.
$ sudo apt install nodejs npm
$ sudo yum install epel-release
$ sudo yum install nodejs
$ sudo npm install -global n
$ sudo n stable
$ sudo apt remove nodejs npm
$ sudo ln -s /usr/local/bin/node /usr/bin/node
$ sudo ln -s /usr/local/bin/npm /usr/bin/npm