Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

Turbolinks for Flask.

Project Description

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

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 turbolinks.js.coffee

Demo

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.

Credits

Thanks for rails, thanks for the help of Rei.

Changelog

We keep the changelog on GitHub releases.

Release History

Release History

This version
History Node

0.2.0

History Node

0.1.3

History Node

0.1.2

History Node

0.1.1

History Node

0.1.0

Download Files

Download Files

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

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
Flask-Turbolinks-0.2.0.tar.gz (4.0 kB) Copy SHA256 Checksum SHA256 Source Feb 9, 2014

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting