summaryrefslogtreecommitdiff
path: root/docs/url_dispatch.txt
diff options
context:
space:
mode:
authorMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2008-02-16 06:57:52 +0000
committerMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2008-02-16 06:57:52 +0000
commit2d0588548e52c78e5213d262a5c4e5df1da3450e (patch)
tree3b317c630ea29b42a67b11e26d3599962f1a593b /docs/url_dispatch.txt
parent770d587314fb0275f0570b05ee5bc746c2b2c685 (diff)
queryset-refactor: Merged from trunk up to [7122].
git-svn-id: http://code.djangoproject.com/svn/django/branches/queryset-refactor@7124 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'docs/url_dispatch.txt')
-rw-r--r--docs/url_dispatch.txt22
1 files changed, 22 insertions, 0 deletions
diff --git a/docs/url_dispatch.txt b/docs/url_dispatch.txt
index 6ed7043fd5..789399de8d 100644
--- a/docs/url_dispatch.txt
+++ b/docs/url_dispatch.txt
@@ -190,6 +190,28 @@ The remaining arguments should be tuples in this format::
...where ``optional dictionary`` and ``optional name`` are optional. (See
`Passing extra options to view functions`_ below.)
+.. note::
+ Because `patterns()` is a function call, it accepts a maximum of 255
+ arguments (URL patterns, in this case). This is a limit for all Python
+ function calls. This is rarely a problem in practice, because you'll
+ typically structure your URL patterns modularly by using `include()`
+ sections. However, on the off-chance you do hit the 255-argument limit,
+ realize that `patterns()` returns a Python list, so you can split up the
+ construction of the list.
+
+ ::
+
+ urlpatterns = patterns('',
+ ...
+ )
+ urlpatterns += patterns('',
+ ...
+ )
+
+ Python lists have unlimited size, so there's no limit to how many URL
+ patterns you can construct. The only limit is that you can only create 254
+ at a time (the 255th argument is the initial prefix argument).
+
url
---