摘要: views.py: # 自定义规则 class TestValidator(object): def __init__(self, base): self.base = base def __call__(self, value): # 规则明细 if not value.startswith(se 阅读全文
posted @ 2021-01-19 21:16 Sch01aR# 阅读(496) 评论(0) 推荐(0) 编辑
摘要: views.py: from rest_framework.views import APIView from rest_framework import serializers from django.shortcuts import HttpResponse class UserGroupSer 阅读全文
posted @ 2021-01-19 20:22 Sch01aR# 阅读(201) 评论(0) 推荐(0) 编辑
摘要: 数据库结构和此文章相同:https://www.cnblogs.com/sch01ar/p/14295875.html urls.py: from django.urls import path, re_path from drf import views urlpatterns = [ path( 阅读全文
posted @ 2021-01-19 17:38 Sch01aR# 阅读(122) 评论(0) 推荐(0) 编辑
摘要: 数据库结构和上篇文章一样:https://www.cnblogs.com/sch01ar/p/14295875.html views.py: from rest_framework.views import APIView from rest_framework import serializers 阅读全文
posted @ 2021-01-19 15:36 Sch01aR# 阅读(93) 评论(0) 推荐(0) 编辑