diff options
| author | Collin Anderson <collin@onetencommunications.com> | 2014-08-12 14:12:50 -0400 |
|---|---|---|
| committer | Collin Anderson <collin@onetencommunications.com> | 2014-08-12 14:44:09 -0400 |
| commit | 8f9dd9f256239d77ef20d6b4d2f48f08208e504a (patch) | |
| tree | d41402cf06e61f41d8d5de9b2af99778ea3673ad /docs/intro | |
| parent | 49419ffd050d34c4f0948a0e9b68eb081985277b (diff) | |
[1.7.x] Refs #23276: Removed bad examples of passing views as strings to url()
partial backport of a9fd740d22 from master
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 cbb1a832df..34cee09f22 100644 --- a/docs/intro/overview.txt +++ b/docs/intro/overview.txt @@ -186,10 +186,12 @@ example above:: from django.conf.urls import patterns + from . import views + urlpatterns = patterns('', - (r'^articles/(\d{4})/$', 'news.views.year_archive'), - (r'^articles/(\d{4})/(\d{2})/$', 'news.views.month_archive'), - (r'^articles/(\d{4})/(\d{2})/(\d+)/$', 'news.views.article_detail'), + (r'^articles/(\d{4})/$', views.year_archive), + (r'^articles/(\d{4})/(\d{2})/$', views.month_archive), + (r'^articles/(\d{4})/(\d{2})/(\d+)/$', views.article_detail), ) The code above maps URLs, as simple `regular expressions`_, to the location of |
