Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

[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
Tim Graham authored

Showing 1 changed file with 7 additions and 1 deletion. Show diff stats Hide diff stats

  1. 8  docs/ref/contrib/flatpages.txt
8  docs/ref/contrib/flatpages.txt
@@ -82,9 +82,15 @@ to place the pattern at the end of the other urlpatterns::
82 82
 
83 83
     # Your other patterns here
84 84
     urlpatterns += patterns('django.contrib.flatpages.views',
85  
-        (r'^(?P<url>.*)$', 'flatpage'),
  85
+        (r'^(?P<url>.*/)$', 'flatpage'),
86 86
     )
87 87
 
  88
+.. warning::
  89
+
  90
+    If you set :setting:`APPEND_SLASH` to ``False``, you must remove the slash
  91
+    in the catchall pattern or flatpages without a trailing slash will not be
  92
+    matched.
  93
+
88 94
 Another common setup is to use flat pages for a limited set of known pages and
89 95
 to hard code the urls, so you can reference them with the :ttag:`url` template
90 96
 tag::

0 notes on commit b75f1f3

Please sign in to comment.
Something went wrong with that request. Please try again.