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
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
File details
Details for the file Flask-Turbolinks-0.1.1.tar.gz
.
File metadata
- Download URL: Flask-Turbolinks-0.1.1.tar.gz
- Upload date:
- Size: 3.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9d5c40aae2ba6c80b95e87e886f3518c219fa8bbf22638514b75210ac92f8314 |
|
MD5 | 096159f104a00dee2c242562ebffdd52 |
|
BLAKE2b-256 | 02d344d64c0f1139dcef967726522b105be1b153c4651e0d5da54aa9028c8fe0 |