Loading

摘要: 1.根urls.py文件中 from django.contrib import admin from django.urls import path, include, re_path from django.views.static import serve from django.conf i 阅读全文
posted @ 2024-10-07 16:58 一只大学生 阅读(25) 评论(0) 推荐(0)
摘要: ![image](https://img2024.cnblogs.com/blog/3493315/202410/3493315-20241007015555617-251128322.png) 阅读全文
posted @ 2024-10-07 01:54 一只大学生 阅读(98) 评论(0) 推荐(0)
摘要: class UpdateMobileSerializer(serializers.ModelSerializer): old = serializers.CharField(write_only=True, validators=[RegexValidator(r"\d{11}", message= 阅读全文
posted @ 2024-10-06 18:01 一只大学生 阅读(10) 评论(0) 推荐(0)
摘要: ![image](https://img2024.cnblogs.com/blog/3493315/202410/3493315-20241006174621781-78406181.png) 阅读全文
posted @ 2024-10-06 17:46 一只大学生 阅读(16) 评论(0) 推荐(0)
摘要: REST_FRAMEWORK = { 'UNAUTHENTICATED_USER': None, 'UNAUTHENTICATED_TOKEN': None, "EXCEPTION_HANDLER": "utils.view.exception_handler", } 阅读全文
posted @ 2024-10-06 12:58 一只大学生 阅读(9) 评论(0) 推荐(0)
摘要: 1.代码 from rest_framework.pagination import PageNumberPagination class UserModelSerializer(serializers.ModelSerializer): role_display = UserRoleSeriali 阅读全文
posted @ 2024-10-05 23:07 一只大学生 阅读(21) 评论(0) 推荐(0)
摘要: 1.ser.data 示例:在视图中返回序列化后的数据 return Response(serializer.data) 2.ser.validated_data if serializer.is_valid(): validated_data = serializer.validated_data 阅读全文
posted @ 2024-10-05 18:13 一只大学生 阅读(23) 评论(0) 推荐(0)
摘要: ![image](https://img2024.cnblogs.com/blog/3493315/202410/3493315-20241005141917298-1509845982.png) 阅读全文
posted @ 2024-10-05 14:19 一只大学生 阅读(5) 评论(0) 推荐(0)
摘要: https://www.cnblogs.com/Neeo/articles/17588553.html#about 阅读全文
posted @ 2024-10-05 12:12 一只大学生 阅读(10) 评论(0) 推荐(0)
摘要: https://www.cnblogs.com/Neeo/articles/16672659.html#配置过程 阅读全文
posted @ 2024-10-05 11:41 一只大学生 阅读(5) 评论(0) 推荐(0)