Skip to content

Commit 3bf6117

Browse files
authored
Register Django urls (#8778)
Without adding the URLs manually, the users and groups APIs were not usable. My env: (venv) ➜ tutorial pip freeze asgiref==3.5.2 astroid==2.12.13 autopep8==2.0.0 dill==0.3.6 Django==4.1.3 djangorestframework==3.14.0 isort==5.10.1 lazy-object-proxy==1.8.0 mccabe==0.7.0 platformdirs==2.5.4 pycodestyle==2.10.0 pylint==2.15.6 pylint-django==2.5.3 pylint-plugin-utils==0.7 pytz==2022.6 sqlparse==0.4.3 tomli==2.0.1 tomlkit==0.11.6 wrapt==1.14.1
1 parent 4ef0fc1 commit 3bf6117

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

docs/tutorial/quickstart.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,8 @@ Okay, now let's wire up the API URLs. On to `tutorial/urls.py`...
132132
path('', include(router.urls)),
133133
path('api-auth/', include('rest_framework.urls', namespace='rest_framework'))
134134
]
135+
136+
urlpatterns += router.urls
135137

136138
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.
137139

0 commit comments

Comments
 (0)