diff options
| author | Tim Graham <timograham@gmail.com> | 2014-08-12 10:54:42 -0400 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2014-08-12 13:15:40 -0400 |
| commit | a9fd740d22bc4fed5fdb280c036618000ee13df1 (patch) | |
| tree | 18a58170b4633f22e5869db2c2ed086245ed415c /docs/intro | |
| parent | 2003cb23d4f1b3be717855d41b562d4d5cfebe99 (diff) | |
Fixed #23276 -- Deprecated passing views as strings to url().
Diffstat (limited to 'docs/intro')
| -rw-r--r-- | docs/intro/overview.txt | 8 |
1 files changed, 5 insertions, 3 deletions
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 |
