mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-08-05 04:50:12 +03:00
Merge ec04013776
into fd72a814f8
This commit is contained in:
commit
edcf2fe7c4
|
@ -87,8 +87,8 @@ Make sure to also import the `UserSerializer` class
|
|||
|
||||
Finally we need to add those views into the API, by referencing them from the URL conf. Add the following to the patterns in `urls.py`.
|
||||
|
||||
url(r'^users/$', views.UserList.as_view()),
|
||||
url(r'^users/(?P<pk>[0-9]+)/$', views.UserDetail.as_view()),
|
||||
url(r'^users/$', views.UserList.as_view(), name='user-list'),
|
||||
url(r'^users/(?P<pk>[0-9]+)/$', views.UserDetail.as_view(), name='user-detail'),
|
||||
|
||||
## Associating Snippets with Users
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user