Django
官网:? ? ? ?https://www.djangoproject.com/ 中文文档:https://docs.djangoproject.com/zh-hans/2.0
Django REST Framework 官网:? ? http://www.django-rest-framework.org
Django
1 | check | 检查 | | 2 | compilemessages | 编译信息 | | 3 | createcachetable | 创建缓存表 | | 4 | dbshell | | | 5 | diffsettings | | | 6 | dumpdata | | | 7 | flush | | | 8 | inspectdb | | | 9 | loaddata | | | 10 | makemessages | | | 11 | makemigrations | | | 12 | migrate | 迁移 | 3、python manage.py migrate? 也可用来创建数据库 | 13 | runserver | 启动服务 | 5、python manage.py runserver 5、python manage.py runserver 127.0.0.1:8001 | 14 | sendtestemail | | | 15 | shell | | | 16 | showmigrations | | | 17 | sqlflush | | | 18 | sqlmigrate | | | 19 | sqlsequencereset | | | 20 | squashmigrations | | | 21 | startapp | 创建应用 | 2、python manage.py startapp {{应用名称}} | 22 | startproject | 创建项目 | 1、django-admin startproject {{项目名称}} | 23 | test | | | 24 | testserver | | | 25 | creatsuperuser | 创超级管理员 | 4、python manage.py createsuperuser http://127.0.0.1:8000/admin |
Django REST Framework
1 | 特点 | 快速开发webAPI 支持认证策略,OAyth1? OAuth2 支持ORM(对象关系映射)和非ORM数据源的序列化 | | 2 | 安装 | pip install djangorestframework pip install markdown pip install django-filter | 框架 文档 过滤 |
?
Django REST Framework API Guide
1 | Permissions | 许可,权限 | 全局设置默认权限策略? settings.py REST_FRAMEWORK = { ? ? 'DEFAULT_PERMISSION_CLASSES': [ ? ? ? ? 'rest_framework.permissions.IsAuthenticated', ? ? ] } | 2 | Serializers | 序列化 | | 3 | Views | 视图 | | 4 | Routers | 路由 | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
|