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
5f243ae657
|
@ -69,8 +69,8 @@ We'll also need to refactor our URLconf slightly now we're using class based vie
|
|||
from snippets import views
|
||||
|
||||
urlpatterns = patterns('',
|
||||
url(r'^snippets/$', views.SnippetList.as_view()),
|
||||
url(r'^snippets/(?P<pk>[0-9]+)/$', views.SnippetDetail.as_view()),
|
||||
url(r'^snippets/$', views.SnippetList.as_view(), name='snippet-list'),
|
||||
url(r'^snippets/(?P<pk>[0-9]+)/$', views.SnippetDetail.as_view(), name='snippet-detail'),
|
||||
)
|
||||
|
||||
urlpatterns = format_suffix_patterns(urlpatterns)
|
||||
|
|
Loading…
Reference in New Issue
Block a user