python django cms wagtail install

參考自 https://github.com/wagtail/bakerydemo#setup-with-virtualenv

sudo apt install python3-pip
pip install --user virtualenv
pip install --user virtualenvwrapper

vim ~/.bashrc
export WORKON_HOME=$HOME/.virtualenvs
export VIRTUALENVWRAPPER_PYTHON=/usr/bin/python3
export VIRTUALENVWRAPPER_VIRTUALENV_ARGS=' -p /usr/bin/python3 '
export PROJECT_HOME=$HOME/Devel
source /usr/local/bin/virtualenvwrapper.sh
# 上面最後一行如果路徑不對 執行一下 which virtualenvwrapper.sh

source ~/.bashrc

# 如果不確定版本的話  python --version
mkvirtualenv wagtailbakerydemo --python=python3.9

mkdir ~/dev
cd ~/dev [or your preferred dev directory]
git clone https://github.com/wagtail/bakerydemo.git
cd bakerydemo
pip install -r requirements/development.txt

cp bakerydemo/settings/local.py.example bakerydemo/settings/local.py
echo "DJANGO_SETTINGS_MODULE=bakerydemo.settings.local" > .env

./manage.py migrate
./manage.py load_initial_data
./manage.py runserver

發佈留言