Coder Social home page Coder Social logo

yullin / flask-vuejs Goto Github PK

View Code? Open in Web Editor NEW

This project forked from yymm/flask-vuejs

0.0 2.0 0.0 3.3 MB

Example & Tips, Flask with Vue.js.

Home Page: https://flaskvuejs.herokuapp.com/

Python 1.85% CSS 1.39% JavaScript 79.29% HTML 16.30% Vue 1.10% TypeScript 0.06%

flask-vuejs's Introduction

Flask-Vue.js

๐Ÿฃ compatible Vue.js v2 ๐Ÿฃ

confrict a Jinja2 delimiter and Vue.js delimiter...

=> change Jinja2 delimiter

from flask import Flask

class CustomFlask(Flask):
  jinja_options = Flask.jinja_options.copy()
  jinja_options.update(dict(
    block_start_string='(%',
    block_end_string='%)',
    variable_start_string='((',
    variable_end_string='))',
    comment_start_string='(#',
    comment_end_string='#)',
  ))

app = CustomFlask(__name__)

#
# your flask code here
#

=> change Vue.js delimiter

var app = new Vue({
  el: "#app",
  delimiters: ["[[", "]]"],
  data: {
    message: "Hello Vue!"
  }
})

Example & Tips

This repository contain some example, if you want to try it please do as follows.

requirements: Flask (=> pip install Flask)

$ git clone https://github.com/yymm/flask-vuejs.git
$ cd flask-vuejs
$ python app.py

see localhost:5000.

Heroku Button

Try it now.

Deploy

Menu

  • Jinja2 & Vue.js
  • with SQLAlchemy(Flask-SQLAlchemy)
  • more...
  • SPA
    • using CDN
      • vue-router
    • using Node.js(using vue-cli 'webpack-simple')
      • Single File Component
      • TypeScript with Single File Component
      • Vuex
  • Vue.js v0.10.3

flask-vuejs's People

Contributors

hashrock avatar leitelm avatar yymm avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.