Giter VIP home page Giter VIP logo

zinnia-theme-html5's Introduction

Zinnia-theme-html5

Zinnia-theme-html5 is a python package providing HTML5 templates for django-blog-zinnia.

Installation

First of all you need to install and configure django-app-namespace-template-loader into your project.

Then once Zinnia is installed on your Django project and this package installed on your PYTHON_PATH, simply register the zinnia_html5 application in the INSTALLED_APP section of your project's settings.

Now Zinnia is HTML5 ready.

Warning

  • zinnia_html5 must be registered before the zinnia app to bypass the loading of the Zinnia's templates.
  • You need to use the django.template.loaders.eggs.Loader template loader if you have installed the package as an egg.

HTML5 Validation

If you want to have strict HTML5 documents and pass the validation tests you must register the DraftHTML5ValidatorCleaner middleware to clean the templates of the not already supported attributes or relationships.

MIDDLEWARE_CLASSES = (
    ... # Your middlewares
    'zinnia_html5.middleware.DraftHTML5ValidatorCleaner',
    )

The problem is that HTML5 is still in draft, and some microformats are not already allowed by the on-line validators.

Instead of rewriting all the Zinnia's templates it's easier to add this middleware and disable it when the HTML5 specifications will be completed and the on-line HTML5 validators up-to-date.

Note

You need to install the beautifulsoup4 and html5lib packages for using this middleware.

zinnia-theme-html5's People

Contributors

fantomas42 avatar

Watchers

Jeremy Redd avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.