bug fix

drf url 去掉末尾的 "/"

trailing_slash=False

from . import views
from rest_framework.routers import SimpleRouter

user_url = SimpleRouter(trailing_slash=False)
user_url.register(r'users', views.UserAPIView)

urlpatterns = [
]
urlpatterns += user_url.urls

posted @ 2024-06-26 23:39  Tank-Li  阅读(10)  评论(0编辑  收藏  举报