Преглед изворни кода

Fixed #13623 - code in intro-tutorial03 missing an import statement

Thanks to lescoutinhovr@gmail.com, AMJ for the report, and to zerok/timo for
the patch.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@13847 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Luke Plant пре 14 година
родитељ
комит
76366aab18
1 измењених фајлова са 4 додато и 0 уклоњено
  1. 4 0
      docs/intro/tutorial03.txt

+ 4 - 0
docs/intro/tutorial03.txt

@@ -474,10 +474,14 @@ Copy the file ``mysite/urls.py`` to ``mysite/polls/urls.py``. Then, change
 ``mysite/urls.py`` to remove the poll-specific URLs and insert an
 :func:`~django.conf.urls.defaults.include`::
 
+    # This also imports the include function
+    from django.conf.urls.defaults import *
+
     # ...
     urlpatterns = patterns('',
         (r'^polls/', include('mysite.polls.urls')),
         # ...
+    )
 
 :func:`~django.conf.urls.defaults.include`, simply, references another URLconf.
 Note that the regular expression doesn't have a ``$`` (end-of-string match