replaced 404_handler.py with 404.py

Ryan Barrett <pyblosxom-6sb6M7qyT/[email protected]>
Newsgroups gmane.comp.web.pyblosxom.user
Message-ID <[email protected]>
hi all. i recently checked in rev 1093, which replaces contrib/404_handler.py 
with 404.py. 404.py is a simpler, more usable plugin for handling 404 not 
found errors with a custom page.

you simply create a 404 template for your flavour, e.g. 404.html if you use 
the html flavour, and include the html you want displayed. it provides $path, 
$path_stripped, and $title template variables, as well as the variables from 
your config.py.

you can see it in action at http://snarfed.org/404 , which returns a 404. that 
404 template uses google's ajax search api and ajax_search.js to show pages on 
your site that might be related to what the user was looking for. you can see 
the template here:

http://snarfed.org/404.snarfed

feel free to grab 404.py from svn and try it out!

http://pyblosxom.svn.sourceforge.net/viewvc/pyblosxom?view=rev&revision=1093

-Ryan

--
http://snarfed.org/

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.