update
This commit is contained in:
parent
44d8561ed0
commit
9ad821a28e
|
@ -1,8 +1,11 @@
|
|||
from flask import Flask, render_template
|
||||
from flask_bootstrap import Bootstrap
|
||||
from flask_moment import Moment
|
||||
from flask import Flask
|
||||
from config import config
|
||||
|
||||
|
||||
def create_app(config_name):
|
||||
app = Flask(__name__)
|
||||
app.config.from_object(config[config_name])
|
||||
from .main import main as main_blueprint
|
||||
app.register_blueprint(main_blueprint)
|
||||
|
||||
return app
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
from flask import Blueprint
|
||||
|
||||
main = Blueprint('main', __name__)
|
||||
|
||||
from . import views, errors
|
||||
|
|
0
app/main/errors.py
Normal file
0
app/main/errors.py
Normal file
7
app/main/views.py
Normal file
7
app/main/views.py
Normal file
|
@ -0,0 +1,7 @@
|
|||
from . import main
|
||||
import json
|
||||
|
||||
|
||||
@main.route('/', methods=['GET', 'POST'])
|
||||
def index():
|
||||
return json.dumps({'Message': 'Hello, world'})
|
Loading…
Reference in New Issue
Block a user