diff options
| author | Malcolm Tredinnick <malcolm.tredinnick@gmail.com> | 2008-10-06 08:46:54 +0000 |
|---|---|---|
| committer | Malcolm Tredinnick <malcolm.tredinnick@gmail.com> | 2008-10-06 08:46:54 +0000 |
| commit | 82a01a63a64cb39b187b4f580cb1f62d0f5d2d0a (patch) | |
| tree | 83c0ac60a5817169504e2bdcc9b808418fe26c87 | |
| parent | 282c38d4067d8604c37d70c1827b4244c9e53b18 (diff) | |
[1.0.X] Fixed #8184 -- Added a note to the documentation for reverse() that all
views must be importable for URL reversing to work correctly.
Backport of r9167 from trunk.
git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@9173 bcc190cf-cafb-0310-a4f2-bffc1f526a37
| -rw-r--r-- | docs/topics/http/urls.txt | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/docs/topics/http/urls.txt b/docs/topics/http/urls.txt index aa07826d56..dcb434bf39 100644 --- a/docs/topics/http/urls.txt +++ b/docs/topics/http/urls.txt @@ -620,6 +620,20 @@ vertical bar (``"|"``) character. You can quite happily use such patterns for matching against incoming URLs and sending them off to views, but you cannot reverse such patterns. +.. admonition:: Make sure your views are all correct + + As part of working out which URL names map to which patterns, the + ``reverse()`` function has to import all of your URLConf files and examine + the name of each view. This involves importing each view function. If + there are *any* errors whilst importing any of your view functions, it + will cause ``reverse()`` to raise an error, even if that view function is + not the one you are trying to reverse. + + Make sure that any views you reference in your URLConf files exist and can + be imported correctly. Do not include lines that reference views you + haven't written yet, because those views will not be importable. + + permalink() ----------- |
