dag / flask-genshi

Genshi templating for Flask

Home Page:http://packages.python.org/Flask-Genshi/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

About

Genshi templating for Flask

http://packages.python.org/Flask-Genshi/

License:Other


Languages

Language:Python 89.0%Language:Shell 11.0%Language:JavaScript 0.0%