This simple app does validation on all the HTML generated by your Django app, and keeps track of any pages that fail. You will no longer have any excuse for pages that aren't valid HTML :-) .
It uses a middleware to intercept all outgoing HTML and validate it using an external command line application. It then logs any failures, and provides some pages for viewing and clearing out the list of failures. This means that it can catch HTML errors that are only produced by 'POST' actions, which otherwise are painful to check for (since a crawler won't get them).
It currently does this synchronously, so it slows your app down. On my machine, it's only about 1/4 second per page, so it's well worth it, and obviously it is only meant for development purposes - you just comment out a few config lines to disable it for live sites.
Here's a screenshot of it picking fault in an early version of itself:
See the PyPI page
See the README
See the BitBucket issue tracker
See the CHANGES file.
© 2010 Luke Plant <L dot Plant dot 98 at
cantab dot net>
Back to lukeplant.me.uk