Load api as blueprint within app.py
This commit is contained in:
parent
1574fb153b
commit
fe367f664e
2 changed files with 6 additions and 2 deletions
|
@ -1 +1,2 @@
|
||||||
import models
|
import models
|
||||||
|
import api
|
||||||
|
|
|
@ -4,8 +4,11 @@ from flask import Flask
|
||||||
import config
|
import config
|
||||||
import json
|
import json
|
||||||
|
|
||||||
|
from api.api import api
|
||||||
|
|
||||||
app = Flask(__name__)
|
app = Flask(__name__)
|
||||||
app.secret_key = config.SECRET
|
app.secret_key = config.SECRET
|
||||||
|
app.register_blueprint(api)
|
||||||
|
|
||||||
@app.route("/api")
|
@app.route("/api")
|
||||||
def api():
|
def api():
|
||||||
|
|
Loading…
Reference in a new issue