摘要:
序列化组件对数据的增删改查 1 写一个序列化的类,继承Serializer 2 在类中写要反序列化的字段,想反序列化哪个字段,就在类中写哪个字段,字段的属性(max_lenth......) max_length 最大长度 min_lenght 最小长度 allow_blank 是否允许为空 tri 阅读全文
posted @ 2023-10-31 21:46
PiggThird
阅读(39)
评论(0)
推荐(0)
摘要:
# 安装:pip install djangorestframework==3.10.3 # 使用 1 在setting.py 的app中注册 INSTALLED_APPS = [ 'rest_framework' ] 2 在models.py中写表模型 class Book(models.Mode 阅读全文
posted @ 2023-10-31 21:34
PiggThird
阅读(34)
评论(0)
推荐(0)
摘要:
Restful规范(重点) REST全称是Representational State Transfer,中文意思是表述(编者注:通常译为表征性状态转移)。 它首次出现在2000年Roy Fielding的博士论文中。 RESTful是一种定义Web API接口的设计风格,尤其适用于前后端分离的应用 阅读全文
posted @ 2023-10-31 21:33
PiggThird
阅读(41)
评论(0)
推荐(0)

浙公网安备 33010602011771号