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.*)$', 'flatpage'), + (r'^(?P.*/)$', '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::