更新时间:2023-02-23 21:09:05
urlpatterns = [
...
path('', include(router.urls)),
path('api-auth/', include('rest_framework.urls', namespace='rest_framework')),
...
]
带有 path('',include(router.urls)),
您可以获得:
http://127.0.0.1:8000/regulations/
http://127.0.0.1:8000/languages/
with
path('api-auth/', include('rest_framework.urls', namespace='rest_framework')),
您可以获得:
http://127.0.0.1:8000/api-auth/{other paths}