【发布时间】:2021-11-27 08:17:45
【问题描述】:
我在 Django-rest-framework 中有一个项目,使用基于 youtube 教程的 react spa Bryan Dunn - Web 开发视频 here。我在将其扩展到博客应用时遇到问题,因为我不断收到此错误。
#blog/view.py
class BlogListAPIView(ListCreateAPIView):
serializer_class = BlogSerializer
queryset = Blog.objects.all()
class BlogDetailAPIView(RetrieveUpdateDestroyAPIView):
serializer_class = BlogSerializer
queryset = Blog.objects.all()
lookup_field = "id"
这是前端请求的问题吗?也许是一个丢失的标题或其他东西或后端?因为我在 Postman 和 YASG 中使用它没有问题。
【问题讨论】:
标签: reactjs django authentication django-rest-framework djoser