mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-07-30 18:09:59 +03:00
Section 5 requires URLs in section 4 to be named.
This commit is contained in:
parent
fd4a66cfc7
commit
0a6b115f6d
|
@ -78,8 +78,8 @@ We'll also add a couple of views. We'd like to just use read-only views for the
|
|||
|
||||
Finally we need to add those views into the API, by referencing them from the URL conf.
|
||||
|
||||
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