1 创建一个目录,用于专门存放Django工程的虚拟环境

  PyCharm默认虚拟环境在工程内,从而导致打包的时候,会把虚拟环境一起打包。

  同时,虚拟环境中的插件较多,一个工程创建了一个虚拟环境,以后,其它的工程可以共享这个虚拟环境。

2 打开PyCharm,选择创建Django工程。

3 安装pip

  pip在开发环境中已安装,但在虚拟环境中PyCharm只安装了开发环境中的相应版本的Django,而没有安装pip,故虚拟环境中需要重新安装。

  安装方法同样是在pypi.org上下载一个pip-20.0.2包,用7Zip解压后,进入目录执行:python setup.py install

4 安装工程插件

  开源软件官方网站几乎都在国外,速度慢,为了提交效率,一般用国内镜像源安装。

  国内镜像源很多,以下使用清华镜像源。地址为:https://pypi.tuna.tsinghua.edu.cn/simple

4.01 安装DRF框架(即djangorestframework框架)

  DRF框架是基于Django框架之上的一个框架。

pip install -i https://pypi.tuna.tsinghua.edu.cn/simple djangorestframework

4.02 python3 安装操作mysql数据库的包

pip install -i https://pypi.tuna.tsinghua.edu.cn/simple --upgrade mysqlclient

4.03 添加django-fitlter扩展来增强支持

pip install -i https://pypi.tuna.tsinghua.edu.cn/simple django-filter

4.04 自动生成接口文档

pip install -i https://pypi.tuna.tsinghua.edu.cn/simple coreapi

4.05 安装Markdown插件

  Markdown插件主要用于把文本渲染成HTML格式。此处主要用于对coreapi中注释文本换行。

pip install -i https://pypi.tuna.tsinghua.edu.cn/simple Markdown

4.06 安装图像处理库

pip install -i https://pypi.tuna.tsinghua.edu.cn/simple Pillow

4.07 安装Redis工具包

pip install -i https://pypi.tuna.tsinghua.edu.cn/simple redis

4.08 安装redis缓存工具包

pip install -i https://pypi.tuna.tsinghua.edu.cn/simple django-redis

4.09 安装异步处理工具包

pip install -i https://pypi.tuna.tsinghua.edu.cn/simple celery

4.10 win10下面启动celery需要安装eventlet包:

pip install -i https://pypi.tuna.tsinghua.edu.cn/simple eventlet

4.11 安装跨域CORS

pip install -i https://pypi.tuna.tsinghua.edu.cn/simple django-cors-headers

4.12 安装Json Web Token认证

pip install -i https://pypi.tuna.tsinghua.edu.cn/simple djangorestframework-jwt

4.13 安装itsdangerous生成凭据access_token

pip install -i https://pypi.tuna.tsinghua.edu.cn/simple itsdangerous

4.14 安装缓存扩展

pip install -i https://pypi.tuna.tsinghua.edu.cn/simple drf-extensions

4.15 安装xmltodict工具包

pip install -i https://pypi.tuna.tsinghua.edu.cn/simple xmltodict

4.16 安装xadmin包

pip install -i https://pypi.tuna.tsinghua.edu.cn/simple future
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple six
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple httplib2
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple django-import-export

4.17 安装微信插件

pip install -i https://pypi.tuna.tsinghua.edu.cn/simple wechatpy
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple cryptography

4.18 让django restfull支持xml解析

pip install -i https://pypi.tuna.tsinghua.edu.cn/simple djangorestframework-xml

4.19 安装腾讯云短信SDK

pip install qcloudsms_py

4.20 安装fastDFS插件

pip install -i https://pypi.tuna.tsinghua.edu.cn/simple py3Fdfs
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple djangorestframework
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple django-filter
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple coreapi
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple Markdown
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple Pillow
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple redis
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple django-redis
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple celery
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple django-celery-results
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple django-celery-beat
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple django-cors-headers
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple djangorestframework-jwt
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple itsdangerous
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple drf-extensions
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple xmltodict
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple wechatpy
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple cryptography
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple djangorestframework-xml
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple qcloudsms_py
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple requests
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple py3Fdfs
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple future
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple six
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple httplib2
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple django-import-export
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple --upgrade mysqlclient

5 运行工程

  看到以下欢迎页面,表示工程创建成功!

0002 Django工程创建的更多相关文章

  1. python web框架 django 工程 创建 目录介绍

    # 创建Django工程django-admin startproject [工程名称] 默认创建django 项目都会自带这些东西 django setting 配置文件 django可以配置缓存 ...

  2. Django工程创建

    方法一: 1.win+r进入cmd命令窗口: 2.找到Django的安装地址: 3.cmd窗口中利用cd 进入相应的文件夹,再输入命令如下: django-admin.exe startproject ...

  3. Django—工程创建以及models数据库易错点

    Python的WEB框架有Django.Tornado.Flask 等多种,Django相较与其他WEB框架其优势为:大而全,框架本身集成了ORM.模型绑定.模板引擎.缓存.Session等诸多功能. ...

  4. Django工程

    一.Django工程创建 1.Django安装: pip3 install django 安装成功后,会在python的安装目录下“Scripts"中生成”django-admin.exe& ...

  5. Django后台创建

    1.首先创建Django工程 创建Django有两种方法我用的是pycharm的创建 2.查看url.py 如下 from django.contrib import admin from djang ...

  6. Django初探——工程创建以及models数据库相关配置

    Python的WEB框架有Django.Tornado.Flask 等多种,Django相较与其他WEB框架其优势为:大而全,框架本身集成了ORM.模型绑定.模板引擎.缓存.Session等诸多功能. ...

  7. 第1天:Django框架简介与工程创建

    Django简介 Django特点 环境搭建 创建工程 启动服务 使用pycharm打开工程 创建子应用 Django简介 Django,是用Python语言写的开源web开发框架,并遵循MVC设计. ...

  8. django学习笔记【001】django版本的确定&创建一个django工程

    2.3 查看当前的django版本 python3. -m django --version 2.3.1 创建一个django工程 django-admin startproject mysite 在 ...

  9. Django基于Pycharm开发之一【创建django工程】

    Django的工程结构,可以通过pycharm里面,选择创建django工程来直接创建,也可以通过命令行通过pip来安装. 一.通过命令行安装的步骤 Install Python. Install a ...

随机推荐

  1. 你一定看得懂的 DDD+CQRS+EDA+ES 核心思想与极简可运行代码示例

    前言 随着分布式架构微服务的兴起,DDD(领域驱动设计).CQRS(命令查询职责分离).EDA(事件驱动架构).ES(事件溯源)等概念也一并成为时下的火热概念,我也在早些时候阅读了一些大佬的分析文,学 ...

  2. 浏览器中常见的html语义化标签

    html标签默认在浏览器中展示的样式,html标签的用途:语义化(明白每个标签的用途,在什么情况下使用此标签合理);标签语义化好处:1.更容易被搜索引擎收录2.更容易让屏幕阅读器读出网页内容. 网页上 ...

  3. MFC/QT 学习笔记(四)——MFC基于对话框学习控件(下)

    //5.列表控件 ListControl 属性 报表模式 view:Report:添加变量 //Cdemo5Dlg.cpp ps:资源视图 右键 类向导 成员变量 查看对象所属类 // TODO: 在 ...

  4. jmeter-json提取器提取的内容含”引号

    这时如果直接赋值会报错  解决方法: 1.用vars.get("Object")提取变量的值 2.用代码提取,最后把提取到的Object或Array转为String

  5. 五种编程语言解释数据结构与算法——顺序表2(java与C++语言实现)

    5.java实现方式: 5.1.顺序表的抽象结构 package com.xgp.顺序表; public interface MyList<T> { //1. initList(& ...

  6. python_函数笔记

    第二章 函数编程 定义: 函数是指将一组语句的集合通过一个名字(函数名)封装起来,要想执行这个函数,只需调用其函数名即可 特性: 减少重复代码 使程序变的可扩展 使程序变得易维护 形参变量 只有在被调 ...

  7. Ubuntu禁用root账号,开启Ubuntu密钥登录

    新建普通用户 ## 新建普通用户 $ adduser ubuntu $ apt-get install sudo ## 将用户加入sudo组 $ usermod -a -G sudo ubuntu 为 ...

  8. equals和==的使用

    1.equals的使用: 引用数据类型的比较:通常情况下比较的是引用数据类型下的栈中的地址,但当你重写了equals方法后就不一定了 User user1=new User("tom&quo ...

  9. 如何修复MacBook Pro过热:保持MacBook散热的13个技巧

    尽管MacBook Pro是一台能处理繁重工作量的高能效机器,但它却无法像市场上其他笔记本电脑一样避免过热.至于什么可以防止发热,那不是一两个技巧就能解决的问题.相反,这是一组技巧可以解决的挑战. 因 ...

  10. axios上传图片遇见问题

    博客后台,vue-quill-editor 编辑器,上传图片,使用sm.ms图床,上传逻辑需要自定义,element-ui,el-upload,自定义http-request上传图片, 'conten ...