Hi all,

This evening I wrote an app and middleware to help me with
development of my Django project.  It validates all the HTML generated
by your Django project, and logs any failures, including the original
request object, the response object and the errors. It's more useful
than a crawler because this will catch everything (including pages
generated by a POST request etc), and it could also be configured to
validate CSS or any other mimetype if you wanted. 

It currently does validation synchronously, which adds about 1/4 a
second to the page load time on my machine, but it's well worth it.  It
uses the command line program 'validate' by Liam Quinn, but can be
configured to use anything that works similarly.  In fact, I've wrote a
wrapper script that calls 'validate' and also beeps at me if validate
fails, so I get instant feedback if I've created any invalid HTML.

Here is the obligatory screenshot of it finding HTML errors in
itself:

http://files.lukeplant.fastmail.fm/public/validator_app_sshot.png

(these are fixed now of course :-)
The interface has actually progressed from than screen shot now, but
it's still very simple - just enough to view the list, view details,
delete items.

Anyway, if anyone else wants this, let me know.  It ended up taking up
the whole evening and I didn't have chance to package it up, so I'm
only going to bother if there is some demand.  I've only tested on
Linux, but I imagine it would work on Windows, but would probably be
significantly slower due to starting new processes being quite a
bit slower on Windows.

Regards,

Luke

-- 
"Oh, look. I appear to be lying at the bottom of a very deep, dark 
hole. That seems a familiar concept. What does it remind me of? Ah, I 
remember. Life."  (Marvin the paranoid android)

Luke Plant || L.Plant.98 (at) cantab.net || http://lukeplant.me.uk/

Reply via email to