Django validator app
==================== 

Full docs at:
  http://lukeplant.me.uk/resources/djangovalidator/


Installation and usage
======================
- Run setup.py to install the package into your python path.
- Add "lukeplant_me_uk.django.apps.validator" to your INSTALLED_APPS setting.
- Add the folder <WHERE_YOU_INSTALLED_IT>/lukeplant_me_uk/django/validator/templates
  to your TEMPLATE_DIRS setting
- Insert the middleware
"lukeplant_me_uk.django.validator.middleware.ValidatorMiddleware" near the
beginning of the middleware list (which means it will get the the response
object after everything else). It must be after every middleware that does
post-processing, but mustn't be after GZip, since it can't handle gzipped
HTML. ( I just disable the GZip middleware for development)
- Add a setting to tell the app where to find the 'validate' executable used
for validation. This is a dictionary of mimetypes and corresponding
validators, allowing this app to be extended to any other generated content: 
VALIDATOR_APP_VALIDATORS = {
    'text/html': '/usr/bin/validate',
    'application/xml+xhtml': '/usr/bin/validate',
}


  If executables other than Liam Quinn's 'validate' are used, then ensure
  they work in the same way: 
   - they take a single argument which is the file to validate
   - they print errors to standout output or standard error
   - if there are no errors, they print nothing (like all good Unix programs)

 
  The exit code is currently ignored, but 'validate' sets it correctly so it's
  very easy to wrap it in a small shell script that does other things upon
  failure like beep or display something on the screen. Like this one (the
  second part requires KDE and assumes you are doing django-admin.py runserver
  from a KDE session): 
  #!/bin/sh
        
  validate $1 || 
  { 
        beep -l 5; 
        dcop knotify default notify "validation failed" "django validator"
         "invalid page found" "" "" 16 0 ;
  }

- Finally, run the django admin script to set up the database tables:
  django-admin.py --settings="yourproject.settings" install validator 

LICENSE
=======
MIT (which means in short that it is open source and free of charge for any
use)

Changelog
=========
Version 1.0 - 2005-11-19
 - Initial release
