返回顶部
扩大
缩小

随笔分类 -  每日一(源)码

3. Django每日一码 之 Serializers 源码
摘要:2019 7 6 今日源码:rest framework 序列化Serializers 序列化组件Serializers 源码分析 首先,它需要 data 、many 、 instance,其中 instance 序列化,data为反序列化,many=True时为多条数据。 1)先从many为入口切 阅读全文

posted @ 2019-07-05 17:12 代码创造一切R 阅读(345) 评论(0) 推荐(0)

2. Django每日一码 之as_view() 源码
摘要:2019-7-5 今日源码: as_view() CBV与FBV路由区别 urlpatterns = [ url(r'^publish/$', views.Publishs.as_view()), # CBV写法 url(r'^publish/$', views.publish), # FBV写法 阅读全文

posted @ 2019-07-04 19:53 代码创造一切R 阅读(688) 评论(0) 推荐(0)

1. Django每日一码 之原生View源码
摘要:2019-7-4 今日源码:原生 View 1.URL中调用as_view方法 def as_view(cls, **initkwargs): """ Main entry point for a request-response process. """ for key in initkwargs 阅读全文

posted @ 2019-07-03 16:27 代码创造一切R 阅读(249) 评论(0) 推荐(0)

导航