Stay Hungry,Stay Foolish!

10 2021 档案

摘要:react-router-dom https://github.com/remix-run/react-router/blob/main/docs/getting-started/tutorial.md 对于location的变化, 不论是 hashtag方式, 或者是 通过pushstate改变u 阅读全文
posted @ 2021-10-31 22:29 lightsong 阅读(928) 评论(0) 推荐(0) 编辑
摘要:User authentication in Django https://docs.djangoproject.com/en/3.2/topics/auth/ django带有一个用户认证系统,能够处理 用户账户、组、许可、基于cookie的用户会话。 Django comes with a us 阅读全文
posted @ 2021-10-31 18:14 lightsong 阅读(148) 评论(0) 推荐(0) 编辑
摘要:background 基于django和react构建开发环境: django+restframework作为后台API提供者 react+ant design作为前端UI框架 利用django和react的开发工具的热更新功能, 实现前后台代码更新都不需要手动重启server。 如下拓扑图。 首先 阅读全文
posted @ 2021-10-31 09:55 lightsong 阅读(32) 评论(0) 推荐(0) 编辑
摘要:type annotations https://docs.python.org/3.6/library/typing.html 为类类型提示(IDE or 人类可读)设计, 又叫类型注解。 typing — Support for type hints This module supports t 阅读全文
posted @ 2021-10-26 14:59 lightsong 阅读(58) 评论(0) 推荐(0) 编辑
摘要:Draw and Guess Game https://github.com/fanqingsong/draw_guess draw and guess based on django_channels_chat_official_tutorial_react project, create dra 阅读全文
posted @ 2021-10-24 11:23 lightsong 阅读(67) 评论(0) 推荐(0) 编辑
摘要:Invoke https://docs.pyinvoke.org/en/stable/ The invoke CLI tool Details on the CLI interface to Invoke, available core flags, and tab completion optio 阅读全文
posted @ 2021-10-21 15:26 lightsong 阅读(39) 评论(0) 推荐(0) 编辑
摘要:Django Channels Django 仅仅支持 HTTP协议, Channels 扩展了支持的协议类型, 例如 websocket,chat, IoT. 本身实现基于ASGI协议。 但是你也可以选择 同步模式。 https://channels.readthedocs.io/en/stabl 阅读全文
posted @ 2021-10-20 17:28 lightsong 阅读(75) 评论(0) 推荐(0) 编辑
摘要:OverView Django View -- Root https://docs.djangoproject.com/en/3.2/ref/class-based-views/base/#view 所有view视图的基类, 此类不是通用视图,被业务视图继承。 class django.views. 阅读全文
posted @ 2021-10-17 23:40 lightsong 阅读(52) 评论(0) 推荐(0) 编辑
摘要:ViewSets & Routers https://www.django-rest-framework.org/tutorial/6-viewsets-and-routers/ ViewSets是对模型的高度抽象, 让开发者聚焦于建模状态, 和 接口的交互, 基于通用的规则构建URL. REST 阅读全文
posted @ 2021-10-13 00:08 lightsong 阅读(48) 评论(0) 推荐(0) 编辑
摘要:Relationships & Hyperlinked APIs https://www.django-rest-framework.org/tutorial/5-relationships-and-hyperlinked-apis/ 对于表之间的关联关系, ModelSerializer 默认是使 阅读全文
posted @ 2021-10-12 23:39 lightsong 阅读(39) 评论(0) 推荐(0) 编辑
摘要:Authentication & Permissions https://www.django-rest-framework.org/tutorial/4-authentication-and-permissions/ 对于view需要限制用户的访问权限, 例如认证 和 许可。 Currently 阅读全文
posted @ 2021-10-12 23:21 lightsong 阅读(52) 评论(0) 推荐(0) 编辑
摘要:Class-based Views https://www.django-rest-framework.org/tutorial/3-class-based-views/ APIView 继承于 django view类提供了 http method 方法的抽象, 即继承于此类的应用类中, 可以定义 阅读全文
posted @ 2021-10-12 22:30 lightsong 阅读(50) 评论(0) 推荐(0) 编辑
摘要:Requests and Responses https://www.django-rest-framework.org/tutorial/2-requests-and-responses/ Request 请求类,扩展了 httprequest类。 请求数据存储在 request.data 成员中 阅读全文
posted @ 2021-10-12 15:18 lightsong 阅读(32) 评论(0) 推荐(0) 编辑
摘要:Django REST framework Django 支持MTV模式, 前端渲染的内容,放在了后端 template中实施,包括获取数据,渲染模板一系列过程都在候选执行。 在前端能力强大的现在, 前后端分离开发模式已经成为主流, 所以后端只提供API, 于前端进行数据交互,成为业界主流。 此框架 阅读全文
posted @ 2021-10-12 15:06 lightsong 阅读(43) 评论(0) 推荐(0) 编辑
摘要:Metaclasses https://www.python.org/dev/peps/pep-3115/ 元类的诞生是来自于大量有趣的用例, 要求在类创建的过程中,就可以参与到类的定制逻辑中去。 The primary reason for changing the way metaclasses 阅读全文
posted @ 2021-10-10 23:50 lightsong 阅读(27) 评论(0) 推荐(0) 编辑
摘要:https://docs.djangoproject.com/en/3.2/misc/design-philosophies/#cache-design-philosophy Loose coupling 低耦合 高内聚-低耦合是其设计目标。 不同的层不需要知道其它层, 除非是绝对必要。 例如: 模 阅读全文
posted @ 2021-10-01 22:49 lightsong 阅读(45) 评论(0) 推荐(0) 编辑

千山鸟飞绝,万径人踪灭
点击右上角即可分享
微信分享提示