Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

[1.5.x] Fixed #21582 -- Corrected URL namespace example.

Thanks oubiga for the report.

Backport of 025ec2e from master
  • Loading branch information...
commit 66ada281d5842da82f1fdc813b941ebb04dec6e3 1 parent fc2c8ee
Tim Graham authored December 26, 2013

Showing 1 changed file with 6 additions and 1 deletion. Show diff stats Hide diff stats

  1. 7  docs/topics/http/urls.txt
7  docs/topics/http/urls.txt
@@ -839,7 +839,7 @@ For example::
839 839
         url(r'^advanced/$', 'apps.help.views.views.advanced'),
840 840
     )
841 841
 
842  
-    url(r'^help/', include(help_patterns, 'bar', 'foo')),
  842
+    url(r'^help/', include((help_patterns, 'bar', 'foo'))),
843 843
 
844 844
 This will include the nominated URL patterns into the given application and
845 845
 instance namespace.
@@ -850,3 +850,8 @@ attribute: A 3-tuple that contains all the patterns in the corresponding admin
850 850
 site, plus the application namespace ``'admin'``, and the name of the admin
851 851
 instance. It is this ``urls`` attribute that you ``include()`` into your
852 852
 projects ``urlpatterns`` when you deploy an Admin instance.
  853
+
  854
+Be sure to pass a tuple to ``include()``. If you simply pass three arguments:
  855
+``include(help_patterns, 'bar', 'foo')``, Django won't throw an error but due
  856
+to the signature of ``include()``, ``'bar'`` will be the instance namespace and
  857
+``'foo'`` will be the application namespace instead of vice versa.

0 notes on commit 66ada28

Please sign in to comment.
Something went wrong with that request. Please try again.