###################################
Test environment under Windows
C:\USERS\WONGG\DJANGO-CMDB>CD. \cmdb
# #下载get-pip.py
# # https://pip.pypa.io/en/stable/installing/
#安装pip
C:\users\wongg>python get-pip.py
Collecting Pip
#安装虚拟环境程序
C:\users\wongg>pip Install Virtualenv
Collecting virtualenv
Successfully installed virtualenv-15.2.0
#创建虚拟环境
C:\users\wongg>virtualenv cmdb-virtualenv
#进入虚拟环境
C:\users\wongg>cmdb-virtualenv\scripts\activate
#安装模块
(cmdb-virtualenv) C:\users\wongg>pip Install-r django-cmdb\docs\requirements
# Initialize dependent packages (one time)
git submodule init # synchronization Module
git submodule Update # updates Submodule
git submodule foreach python setup.py # install submodule to path dependent
# ensure the presence of local configuration files
Touch proj/environ/default.py
# Ensure that the log directory is created correctly
Mkdir-p/cnicg/base/log/cmdb # Linux
MD \cnicg\base\log\cmdb # Windows
# Create a database
Python manage.py Migrate
# If it is the default SQLite database, if you need to rebuild, delete the corresponding file can be
#删除django-cmdb\db\db.sqlite3
# import data
Python manage.py proj load--filename C:\Users\wongg\OneDrive\Niot work related \CMDB development related \ OPS resource management-online. xlsx
git fetch
git checkout Master
Git pull
#运行项目 (web)
(cmdb-virtualenv) c:\users\wongg>django-cmdb\manage.py Runserver
Build a Python virtual environment under Windows