摘要:
1.代码 from rest_framework.pagination import PageNumberPagination class UserModelSerializer(serializers.ModelSerializer): role_display = UserRoleSeriali 阅读全文
摘要:
1.ser.data 示例:在视图中返回序列化后的数据 return Response(serializer.data) 2.ser.validated_data if serializer.is_valid(): validated_data = serializer.validated_data 阅读全文
摘要:
![image](https://img2024.cnblogs.com/blog/3493315/202410/3493315-20241005141917298-1509845982.png) 阅读全文
摘要:
https://www.cnblogs.com/Neeo/articles/17588553.html#about 阅读全文
摘要:
https://www.cnblogs.com/Neeo/articles/16672659.html#配置过程 阅读全文
摘要:
启动redis 1.下载django-redis模块 pip install django-redis 2.settings.py中 CACHES = { "default": { "BACKEND": "django_redis.cache.RedisCache", "LOCATION": "re 阅读全文