django_w3c 0.1.0

Django application for W3C markup validation SOAP service
django_w3c is a Django app for W3C validation service. Shows errors and warnings in the Django admin. Allows validating by url, with file or with fragment.

App uses two methods of the validation:
  1. Validating page exactly when it is opening (short pause may occurs)
  2. Validating page with management command. Each time the page is visited task for validation will create/update. Running the `manage.py validate_prepared` management command validates all visited pages.

Installation:
  py_w3c must to be installed.

  pip install /path/to/django_w3c

  Add 'django_w3c' to INSTALLED_APPS

  Add 'django_w3c.middleware.W3CValidatorMiddleware' to MIDDLEWARE_CLASSES

  Add VALIDATOR_ENABLED = True to your project settings.

Run:
    manage.py syncdb

Usage:
  Default settings assumed.
    Open page wich you want to validate. Go to the admin area, open Validator urls list. Find url you have
  accessed, open it. There you find all errors and warnings. To revalidate just refresh page
  and refresh Validator url in the admin.

    Validating urls wich have no outside access will fail because default setting says `validate by url`.
  There is no way to access url by W3C validator.  In such case you can change VALIDATION_TYPE
  setting to "using_file" or "using_fragment".

Validator settings:
  VALIDATOR_ENABLED - required. Default is False. Enable/disable validator.
  VALIDATION_TYPE - optional. Default is "using_url". What type of the request will send to the W3C.
    Values are "using_url" or "using_file" or "using_fragment".
  VALIDATOR_PREPARE_ONLY - optional. Default is False. Setting to True forces django_w3c to save
    validation candidates instead of validate them right now. To validate candidates use management
    command (manage.py validate_prepared).
  VALIDATOR_IGNORE_RE - optional. Pages match this regular expression will not be validate. By
    default ignoring "/admin/", "/static/", "/media/", "favicon.ico"
  VALIDATOR_TIMEOUT - optional. Default 2 seconds. Minimal timeout between 2 requests to validator.
    Correspond to W3C limitation.
  VALIDATOR_URL - optional. Default is "http://validator.w3.org/check". Change it if you are using
    own copy of W3C validator.

  There are some GET parameters wich may change django_w3c validator behaviour.
    VALIDATE_CURRENT_PAGE_PARAM - Default is "validate_current". GET parameter name passing wich
      forces django_w3c validate current page ignoring PREPARE_ONLY setting and urls queue created
      because of timeout.
    VALIDATION_CHARSET_PARAM - GET parameter name with charset. forces W3C validator to use passed
      charset ignoring charset in the page content. Default is "validation_charset".
    VALIDATION_DOCTYPE_PARAM - GET parameter name with doctype. Forces W3C validator to use passed
      doctype ignoring doctype in the page content. It is case sensitive. Look for available
      doctypes in the W3C page. default "validation_doctype".
    VALIDATION_TYPE_PARAM - default "validation_type". GET parameter name. Passing it makes
      django_w3c ignore VALIDATION_TYPE setting and use passed value instead. Values for this
      parameter are: "using_url", "using_file", "using_fragment"

Warnings:

The urls queue. With default VALIDATION_TIMEOUT setting and VALIDATION_PREPARE_ONLY = False on often access to different urls may create queue with urls validation of wich does not started. Avoid using this app with such settings with project accessed by many users.

last updated on:
February 7th, 2012, 15:14 GMT
price:
FREE!
developed by:
Kazbek Byasov
homepage:
bitbucket.org
license type:
BSD License 
category:
ROOT \ Internet \ HTTP (WWW)

FREE!

In a hurry? Add it to your Download Basket!

user rating

UNRATED
0.0/5
 

0/5

Rate it!

Add your review!

SUBMIT