Section 5 requires URLs in section 4 to be named.

This commit is contained in:
James Summerfield 2013-05-13 08:54:04 +02:00
parent fd4a66cfc7
commit 5f243ae657

View File

@ -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)