djangosnippets.org: Latest snippets tagged with 'suggestion'https://djangosnippets.org/tags/suggestion/2010-02-02T10:13:41-06:00Flatpage Suggester Template tag for 404 templates2010-02-02T10:13:41-06:00bradmontgomeryhttps://djangosnippets.org/snippets/1908/<p>This template tag finds FlatPages with urls 'similar' to the given request_path. It takes the request_path from the page_not_found view (django.views.defaults), picks it apart, and attempts to match existing FlatPages that have a 'similar' URL.</p>
<p>For example, if the URL that resulted in a 404 was:</p>
<pre><code>/foo/bar ...</code></pre>
Freely redistributable