Revert "Register Django urls (#8778)" (#9254)

This reverts commit 3bf611787a.
This commit is contained in:
TAKAHASHI Shuuji 2024-03-10 20:50:53 +09:00 committed by GitHub
parent 730d216794
commit 09a0c551ca
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -133,8 +133,6 @@ Okay, now let's wire up the API URLs. On to `tutorial/urls.py`...
path('api-auth/', include('rest_framework.urls', namespace='rest_framework'))
]
urlpatterns += router.urls
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.
Again, if we need more control over the API URLs we can simply drop down to using regular class-based views, and writing the URL conf explicitly.