<?xml version="1.0" encoding="UTF-8" ?>
<rdf:RDF xmlns="http://usefulinc.com/ns/doap#" xmlns:foaf="http://xmlns.com/foaf/0.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><Project><name>django-genshi</name>
<shortdesc>Django integration for Genshi</shortdesc>
<description>:Author: John Millikin
:Copyright: This document has been placed in the public domain.

Overview
========

``django-genshi`` is a small wrapper library around Genshi that provides
an API similar to ``django.template``. Included are imitations of
``Context`` and ``RequestContext``. There is also an implemention of the
Django template loader system adapted for Genshi, and a selection of
shortcut functions.

Usage
=====

See the `Django` [#]_ and `Genshi` [#]_ documentation for detailed usage notes.
The API of ``django-genshi`` is intended to mirror that of Django, while
writing or manipulating the templates will require knowledge of Genshi.

Genshi cannot use Django's default template loaders -- to work around this,
the ``app_directories``, ``eggs``, and ``filesystem`` loaders have been
modified and included in the ``django_genshi.loaders`` package. Modify your
``TEMPLATE_LOADERS`` accordingly.

Example::

    &gt;&gt;&gt; from django_genshi import render_to_response
    &gt;&gt;&gt; response = render_to_response ('template_name.xml', {"name": "world"})
    &gt;&gt;&gt; print response.content
    &lt;h1&gt;Hello world!&lt;/h1&gt;

.. [#] http://docs.djangoproject.com/en/dev/ref/templates/api/
.. [#] http://genshi.edgewall.org/wiki/Documentation

Output Type Autodetection
=========================

Because Genshi is based on abstract markup streams, it is possible for a
template to be rendered to multiple output representations (such as HTML or
XHTML). The decision of which to render is usually based on the HTTP
``Accept`` header. The ``shortcuts.render_to_response_autodetect`` function
implements a reasonable algorithm for autodetecting output formats, and
serves as an example for writing custom encoders in general.</description>
<download-page>http://pypi.python.org/pypi/django-genshi/1.1.1</download-page>
<homepage rdf:resource="https://launchpad.net/django-genshi" />
<maintainer><foaf:Person><foaf:name>John Millikin</foaf:name>
<foaf:mbox_sha1sum>6fe9388b8eab336a657494d122f745de3b3ad19f</foaf:mbox_sha1sum></foaf:Person></maintainer>
<release><Version><revision>1.1.1</revision></Version></release>
</Project></rdf:RDF>