From d73d0e071c1b4c86d57994a0ab55a74cfe80cdf5 Mon Sep 17 00:00:00 2001 From: Tim Graham Date: Tue, 1 Apr 2014 20:46:34 -0400 Subject: Fixed #22218 -- Deprecated django.conf.urls.patterns. Thanks Carl Meyer for the suggestion and Alex Gaynor and Carl for reviews. --- docs/intro/tutorial04.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'docs/intro/tutorial04.txt') diff --git a/docs/intro/tutorial04.txt b/docs/intro/tutorial04.txt index fbccb93a70..63d12d1a68 100644 --- a/docs/intro/tutorial04.txt +++ b/docs/intro/tutorial04.txt @@ -222,16 +222,16 @@ First, open the ``polls/urls.py`` URLconf and change it like so: .. snippet:: :filename: polls/urls.py - from django.conf.urls import patterns, url + from django.conf.urls import url from polls import views - urlpatterns = patterns('', + urlpatterns = [ url(r'^$', views.IndexView.as_view(), name='index'), url(r'^(?P\d+)/$', views.DetailView.as_view(), name='detail'), url(r'^(?P\d+)/results/$', views.ResultsView.as_view(), name='results'), url(r'^(?P\d+)/vote/$', views.vote, name='vote'), - ) + ] Amend views ----------- -- cgit v1.3