DefaultRouter 不能用post方法请求啊

来源:4-7 Django的URLs与DRF的Routers

do_best

2021-04-09 16:21

提示需要以/结尾才行

RuntimeError: You called this URL via POST, but the URL doesn't end in a slash and you have APPEND_SLASH set. Django can't redirect to the slash URL while maintaining POST data. Change your form to point to 127.0.0.1:8080/course/viewsets/ (note the trailing slash), or set APPEND_SLASH=False in your Django settings.


写回答 关注

1回答

  • do_best
    2021-04-09 16:27:29

    没改东西又可以了,莫名其妙啊

Django REST framework前后端分离框架实践

教你快速构建一个课程管理系统

6655 学习 · 33 问题

查看课程

相似问题