1.0 新建運行環境 命令: pyvip@Vip:~$ mkvirtualenv -p /usr/bin/python3 Django2Running virtualenv with interpreter /usr/bin/python3Using base prefix '/usr'New py ...
1.0 新建運行環境 命令:
pyvip@Vip:~$ mkvirtualenv -p /usr/bin/python3 Django2
Running virtualenv with interpreter /usr/bin/python3
Using base prefix '/usr'
New python executable in /home/pyvip/.virtualenvs/Django2/bin/python3
Also creating executable in /home/pyvip/.virtualenvs/Django2/bin/python
Installing setuptools, pip, wheel...done.
virtualenvwrapper.user_scripts creating /home/pyvip/.virtualenvs/Django2/bin/predeactivate
virtualenvwrapper.user_scripts creating /home/pyvip/.virtualenvs/Django2/bin/postdeactivate
virtualenvwrapper.user_scripts creating /home/pyvip/.virtualenvs/Django2/bin/preactivate
virtualenvwrapper.user_scripts creating /home/pyvip/.virtualenvs/Django2/bin/postactivate
virtualenvwrapper.user_scripts creating /home/pyvip/.virtualenvs/Django2/bin/get_env_details
(Django2) pyvip@Vip:~$
安裝完畢!
2.0安裝 Django
pip install Django
3.0利用pycharm進行代碼同步
4.0 開啟 Django的兩種方法
4.1 xsell 中運行 python manger.py runserver 0:8080 (註:事先應設置setting文件中的
ALLOWED_HOSTS = ['*'] #此處設置 IP 為任意IP訪問
4.2直接在pycharm中配置,通過pycharm啟動
5.0 成功