From a9fd740d22bc4fed5fdb280c036618000ee13df1 Mon Sep 17 00:00:00 2001 From: Tim Graham Date: Tue, 12 Aug 2014 10:54:42 -0400 Subject: Fixed #23276 -- Deprecated passing views as strings to url(). --- docs/intro/overview.txt | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'docs/intro') diff --git a/docs/intro/overview.txt b/docs/intro/overview.txt index 685666f8cb..c60880be5c 100644 --- a/docs/intro/overview.txt +++ b/docs/intro/overview.txt @@ -186,10 +186,12 @@ example above:: from django.conf.urls import url + from . import views + urlpatterns = [ - url(r'^articles/([0-9]{4})/$', 'news.views.year_archive'), - url(r'^articles/([0-9]{4})/([0-9]{2})/$', 'news.views.month_archive'), - url(r'^articles/([0-9]{4})/([0-9]{2})/([0-9]+)/$', 'news.views.article_detail'), + url(r'^articles/([0-9]{4})/$', views.year_archive), + url(r'^articles/([0-9]{4})/([0-9]{2})/$', views.month_archive), + url(r'^articles/([0-9]{4})/([0-9]{2})/([0-9]+)/$', views.article_detail), ] The code above maps URLs, as simple `regular expressions`_, to the location of -- cgit v1.3