summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2013-06-11 12:25:39 -0400
committerTim Graham <timograham@gmail.com>2013-06-11 12:25:39 -0400
commit536703abf029ac1b9c2ebcf6f82fb16da524bebe (patch)
treed92393c94448fbbea40aac49d1a46642ff8fc5bb /docs
parent51739c624185b4b45877f521ed5015f2fe01b6e8 (diff)
Fixed #20500 - Updated flatpages URLconf example to work with APPEND_SLASH.
Thanks josh.23.french@.
Diffstat (limited to 'docs')
-rw-r--r--docs/ref/contrib/flatpages.txt8
1 files changed, 7 insertions, 1 deletions
diff --git a/docs/ref/contrib/flatpages.txt b/docs/ref/contrib/flatpages.txt
index cff3f680d4..11d74d75c3 100644
--- a/docs/ref/contrib/flatpages.txt
+++ b/docs/ref/contrib/flatpages.txt
@@ -82,9 +82,15 @@ to place the pattern at the end of the other urlpatterns::
# Your other patterns here
urlpatterns += patterns('django.contrib.flatpages.views',
- (r'^(?P<url>.*)$', 'flatpage'),
+ (r'^(?P<url>.*/)$', 'flatpage'),
)
+.. warning::
+
+ If you set :setting:`APPEND_SLASH` to ``False``, you must remove the slash
+ in the catchall pattern or flatpages without a trailing slash will not be
+ matched.
+
Another common setup is to use flat pages for a limited set of known pages and
to hard code the urls, so you can reference them with the :ttag:`url` template
tag::