Connect Flask With VueJS Framework
Project description
Install
For install the package run:
$ pip install flask-vuejs
Using
Import the Vue class in bootstrap flask file, see:
from flask_vuejs import Vue
Register extension
Vue(app)
With Factory
vue = Vue()
def create_app():
app = Flask(__name__)
vue.init_app(app)
Configuration
You can set the component directory, by default it uses 'static/components' folder, but, it can be easily changed.
def create_app():
app.config["FLASK_VUE_COMPONENT_DIRECTORY"] = "vuecomponent"
Remember, if you changed component directory, you'll should be rename this directory on 'static' folder application
[JInja Template]
You can see how its works here
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-vuejs-0.1.2.tar.gz
(203.7 kB
view hashes)
Built Distribution
flask_vuejs-0.1.2-py3-none-any.whl
(206.7 kB
view hashes)
Close
Hashes for flask_vuejs-0.1.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 09dac3bc0f0e51f31ead13e6414777764078bd15fe5bda28704d9bb49dc10dfe |
|
MD5 | 9cdc10eff9c565c003490c032750bc55 |
|
BLAKE2b-256 | 53a66bb07b6c55f2c935dd4ce48181160e8c7aa7b581ef79decbf0cf37677d56 |