mirror of
https://github.com/django/django.git
synced 2024-11-29 22:56:46 +01:00
Fixed #20500 - Updated flatpages URLconf example to work with APPEND_SLASH.
Thanks josh.23.french@.
This commit is contained in:
parent
51739c6241
commit
536703abf0
@ -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::
|
||||
|
Loading…
Reference in New Issue
Block a user