{ "info": { "author": "Luke Plant", "author_email": "L.Plant.98@cantab.net", "bugtrack_url": null, "classifiers": [ "Development Status :: 7 - Inactive" ], "description": "=======================\r\nDjango output validator\r\n=======================\r\n\r\n**This project is no longer under active development, and may not work with modern versions of Django.** The primary reasons for this are 1) that I have been unable to find any robust command line validators for HTML5, and 2) I rarely worry about HTML5 validation due to my frustrations with the spec and its authors which go out of their way to make life difficult for tool authors e.g. `bug 12561 `_\r\n\r\nA more recent package with similar aims is: https://github.com/peterbe/django-html-validator\r\n\r\n\r\nThis app validates all the HTML (or potentially other data) that is generated by\r\nyour Django project. This is meant to be used only in development.\r\n\r\nInstallation\r\n============\r\n\r\n* Run setup.py to install the package into your python path.\r\n\r\n* Add \"output_validator\" to your INSTALLED_APPS setting.\r\n\r\n* If you have removed ``\"django.template.loaders.app_directories.Loader\"`` from\r\n your TEMPLATE_LOADERS, you need to add the 'templates' folder to your\r\n TEMPLATE_DIRS setting.\r\n\r\n* Insert the middleware\r\n ``\"output_validator.middleware.ValidatorMiddleware\"``\r\n near the beginning of the middleware list (which means it will get\r\n the the response object after everything else). It must be after\r\n every middleware that does post-processing, but mustn't be after\r\n GZip, since it can't handle gzipped HTML. ( I just disable the GZip\r\n middleware for development)\r\n\r\n* Alter your URL conf to include the URLs for the validator. You need\r\n this line inserted somewhere::\r\n\r\n (r'^validator/', include('output_validator.urls'))\r\n\r\n* Add a setting to tell the app where to find the 'validate'\r\n executable used for validation. This is a dictionary of mimetypes\r\n and corresponding validators, allowing this app to be extended to\r\n any other generated content::\r\n\r\n OUTPUT_VALIDATOR_VALIDATORS = {\r\n 'text/html': '/usr/bin/validate',\r\n 'application/xml+xhtml': '/usr/bin/validate',\r\n }\r\n\r\n I usually use a small wrapper for this executable that pops up\r\n a message when it fails - the following works for GNOME\r\n (if you have the notify-send program installed)::\r\n\r\n #!/bin/sh\r\n validate \"$1\" || {\r\n notify-send \"Validation failed\";\r\n }\r\n\r\n* Finally, run the django admin script to set up the database tables::\r\n\r\n ./manage.py --settings=\"yourproject.settings\" syncdb\r\n\r\n OR, if you are using South::\r\n\r\n ./manage.py --settings=\"yourproject.settings\" migrate output_validator\r\n\r\n* Optionally, set the following settings:\r\n\r\n * OUTPUT_VALIDATOR_IGNORE_PATHS - this is a list of path prefixes that\r\n will be ignored. For example, if you have the admin at ``/admin/``\r\n you can ignore any errors in the admin with this::\r\n\r\n OUTPUT_VALIDATOR_IGNORE_PATHS = [\r\n '/admin/',\r\n ]\r\n\r\n\r\nUsage\r\n=====\r\n\r\nWhen browsing any of your pages in development, all HTML will be validated. If\r\nit fails, it will be logged. You can see all failures at\r\n'http://localhost:8000/validator/' (assuming local development and the URL conf\r\nsuggested above). Use the app to delete old failures once they have been fixed.\r\n\r\n\r\nChangelog\r\n=========\r\n\r\nVersion 1.5 - 2010-12-01\r\n------------------------\r\n\r\n* Re-branded as django-output-validator and packaged properly.\r\n\r\n If you used the previous version, you should drop the old\r\n 'validator_validationfailure' table (assuming it doesn't have any data you\r\n need, of course). Then go through the installation instructions in the README\r\n and update the name/values of the relevant settings.\r\n\r\n* Fixed stashing of request objects (now uses repr). This is BACKWARDS\r\n INCOMPATIBLE with existing data (but we are using a new table anyway).\r\n\r\n\r\nVersion 1.4 - 2008-04-28\r\n------------------------\r\n\r\n* Changed maxlength to max_length, as per change in Django.\r\n* Corrections to instructions (thanks to Gary Wilson)\r\n* Fixed deprecation warnings (thanks to Gary Wilson)\r\n\r\n\r\nVersion 1.3 - 2007-11-05\r\n------------------------\r\n\r\n* Updated for unicodisation of Django.\r\n\r\n This is a BACKWARDS INCOMPATIBLE change.\r\n\r\n The problem was caused by the fact that you used to able to store arbitrary\r\n binary data in a TextField, which is no longer possible. As a result, I am\r\n using base64 encoding for any pickled objects. I haven't written an upgrade\r\n script for the database (since I personally keep the list of failed pages to\r\n zero). If you are upgrading from a previous version, any of your existing\r\n ValidationFailure objects will be corrupted (the 'request' and 'response' data\r\n will be lost). Either deal with the errors before upgrading, or write a\r\n conversion script of some kind :-)\r\n\r\nVersion 1.2 - 2007-04-18\r\n------------------------\r\n\r\n* Fixed bug that occurred when settings.VALIDATOR_APP_IGNORE_PATHS wasn't set\r\n* Added logic to stop duplicate failures being logged\r\n\r\nVersion 1.1 - 2005-12-14\r\n------------------------\r\n\r\n* Added optional VALIDATOR_APP_IGNORE_PATHS setting.\r\n* Added support for mod_python handler - thanks to 'nesh'.\r\n* Added a setup.py script.\r\n\r\nVersion 1.0 - 2005-11-19\r\n------------------------\r\n* Initial release", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://lukeplant.me.uk/resources/djangovalidator/", "keywords": "django HTML XHTML validation validator", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "django-output-validator", "package_url": "https://pypi.org/project/django-output-validator/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/django-output-validator/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://lukeplant.me.uk/resources/djangovalidator/" }, "release_url": "https://pypi.org/project/django-output-validator/1.5/", "requires_dist": null, "requires_python": null, "summary": "App to catch HTML errors (or other errors) in outgoing Django pages.", "version": "1.5" }, "last_serial": 2324372, "releases": { "1.5": [ { "comment_text": "", "digests": { "md5": "b7d19e2bcb50b8dc076c6e8259150f57", "sha256": "de68cb0ce93ad986ecdabfcbfce490aca231ecd114dc1d835b72e3b8cde72bf8" }, "downloads": -1, "filename": "django-output-validator-1.5.tar.gz", "has_sig": false, "md5_digest": "b7d19e2bcb50b8dc076c6e8259150f57", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10012, "upload_time": "2010-12-01T22:52:17", "url": "https://files.pythonhosted.org/packages/9f/b6/235df280f96eb4137745a6f89659fc46d6f0f40009a48bca3a92a78375c2/django-output-validator-1.5.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "b7d19e2bcb50b8dc076c6e8259150f57", "sha256": "de68cb0ce93ad986ecdabfcbfce490aca231ecd114dc1d835b72e3b8cde72bf8" }, "downloads": -1, "filename": "django-output-validator-1.5.tar.gz", "has_sig": false, "md5_digest": "b7d19e2bcb50b8dc076c6e8259150f57", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10012, "upload_time": "2010-12-01T22:52:17", "url": "https://files.pythonhosted.org/packages/9f/b6/235df280f96eb4137745a6f89659fc46d6f0f40009a48bca3a92a78375c2/django-output-validator-1.5.tar.gz" } ] }