Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

[1.5.x] Fixed #20500 - Updated flatpages URLconf example to work with…

… APPEND_SLASH.

Thanks josh.23.french@.

Backport of 536703a from master
  • Loading branch information...
commit b75f1f3d27d06e5fe4fdcc8e74ec3e7caeff7704 1 parent cd1aec6
@timgraham timgraham authored
Showing with 7 additions and 1 deletion.
  1. +7 −1 docs/ref/contrib/flatpages.txt
View
8 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::
Please sign in to comment.
Something went wrong with that request. Please try again.