fix: replace 'namespace' with 'name'

- in tutorial/quickstart.md, in path(namespace='rest_framework') is wrong, path takes no argument called 'namespace', correct one is name="rest_framework"
This commit is contained in:
Pijatow 2025-03-10 01:57:54 +03:30 committed by GitHub
parent 73cbb9cd4a
commit c1094607cf
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -129,7 +129,7 @@ Okay, now let's wire up the API URLs. On to `tutorial/urls.py`...
# Additionally, we include login URLs for the browsable API.
urlpatterns = [
path('', include(router.urls)),
path('api-auth/', include('rest_framework.urls', namespace='rest_framework'))
path('api-auth/', include('rest_framework.urls', name='rest_framework'))
]
Because we're using viewsets instead of views, we can automatically generate the URL conf for our API, by simply registering the viewsets with a router class.