Skip to main content

Turbolinks for Flask.

Project description

Turbolinks for Flask.


To install Flask-Turbolinks, simply:

$ pip install Flask-Turbolinks

Or alternatively if you don’t have pip:

$ easy_install Flask-Turbolinks


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'


And everything works now, no more configuration.


You can install the javascript code with component:

$ component install lepture/flask-turbolinks

You can also grab the code from turbolinks.js on GitHub. It is written in CoffeeScript, you can compile it with:

coffee -c


There is a demo in the example directory, start a server and open the url with Chrome. View the requests with developer tools of Chrome.


Thanks for rails, thanks for the help of Rei.


We keep the changelog on GitHub releases.

Project details

Download files

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

Files for Flask-Turbolinks, version 0.2.0
Filename, size File type Python version Upload date Hashes
Filename, size Flask-Turbolinks-0.2.0.tar.gz (4.0 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page