Skip to main content

Turbolinks for Flask.

Project description

https://travis-ci.org/lepture/flask-turbolinks.png?branch=master https://coveralls.io/repos/lepture/flask-turbolinks/badge.png?branch=master

Turbolinks for Flask.

Installation

To install Flask-Turbolinks, simply:

$ pip install Flask-Turbolinks

Or alternatively if you don’t have pip:

$ easy_install Flask-Turbolinks

Usage

To enable turbolinks, you need to put turbolinks.js in the <head> of your html templates.

The backend flask app should be wrapped with turbolinks:

from flask import Flask
from flask_turbolinks import turbolinks

app = Flask(__name__)
# you app should has a secret key for session
app.secret_key = 'secret')

turbolinks(app)

And everything works now, no more configuration.

Note

This project does not contain the javascript code, you need to grab the code from turbolinks.js on GitHub. It is written in CoffeeScript, you can compile it with:

coffee -c turbolinks.js.coffee

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

Flask-Turbolinks-0.1.1.tar.gz (3.3 kB view details)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page