Genshi templating for Flask
Python Shell
Switch branches/tags
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
docs Revert "close #9" and uh, close #9 - works on GAE Apr 18, 2011
examples/flaskr Ported Flaskr example app Apr 6, 2011
flaskext render(), closes #10 Apr 10, 2011
tests
.gitignore tox Apr 10, 2011
.gitmodules Gitify docs Oct 23, 2010
LICENSE
MANIFEST.in Release: 0.5.1; fix failing installs Nov 27, 2010
README.rst
setup.cfg Reorder API docs and build as dirhtml Apr 3, 2011
setup.py Release: 0.5.1; fix failing installs Nov 27, 2010
tox.ini tox Apr 10, 2011

README.rst

Flask-Genshi

Flask-Genshi is an extension to Flask that allows you to easily use Genshi for templating. Easily switch between HTML5 and XHTML and have the mimetype set automatically for you.

from flask import Flask
from flaskext.genshi import Genshi, render_response

app = Flask(__name__)
genshi = Genshi(app)

@app.route('/')
def index():
    title = 'Genshi + Flask, a match made in heaven!'
    return render_response('index.html', dict(title=title))

You can install the development version from GitHub with easy_install Flask-Genshi==dev but you probably want the latest stable release:

sudo easy_install Flask-Genshi