浏览代码

Added urlpatterns variable in docs/topics/http/urls.txt.

Trey Hunner 8 年之前
父节点
当前提交
91e9be45ed
共有 1 个文件被更改,包括 3 次插入1 次删除
  1. 3 1
      docs/topics/http/urls.txt

+ 3 - 1
docs/topics/http/urls.txt

@@ -816,7 +816,9 @@ For example::
         url(r'^(?P<pk>\d+)/$', views.DetailView.as_view(), name='detail'),
         url(r'^(?P<pk>\d+)/$', views.DetailView.as_view(), name='detail'),
     ], 'polls')
     ], 'polls')
 
 
-    url(r'^polls/', include(polls_patterns)),
+    urlpatterns = [
+        url(r'^polls/', include(polls_patterns)),
+    ]
 
 
 This will include the nominated URL patterns into the given application
 This will include the nominated URL patterns into the given application
 namespace.
 namespace.