多应用+插件架构,代码干净,二开方便,首家独创一键云编译技术,文档视频完善,免费商用码云13.8K 广告
- 全局安装虚拟环境 - D:\Software\Python27\Scripts\pip install virtualenv - 创建虚拟环境到指定目录,方便管理, --no-site-packages所有第三方包都不会复制过来 - D:\Software\Python27\Scripts\virtualenv --no-site-packages D:\Software\venv\python27\django_venv - 进入环境/退出环境 - source D:\Software\venv\python27\django_venv\Scripts\activate - source D:\Software\venv\python27\django_venv\Scripts\deactivate - 安装Django,创建Django项目 - pip install django==1.10.2 - django-admin startproject myblog - 打开pychram指定虚拟环境 ![](https://box.kancloud.cn/0df34e1debeee3efdeccc1d4d042c24f_1017x675.png) - 运行服务器 - python manage.py runserver - 创建应用 - python manage.py startapp blog - 添加应用到settings ~~~ INSTALLED_APPS = [ 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', 'blog' ] ~~~