mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-08-05 13:00:12 +03:00
Merge 0a6b115f6d
into fd72a814f8
This commit is contained in:
commit
a9f099af4b
|
@ -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