Got the app to auto-reload when running in development
This commit is contained in:
7
app.py
7
app.py
@@ -1,3 +1,6 @@
|
||||
import .app
|
||||
from app import create_app
|
||||
|
||||
app.create_app()
|
||||
app = create_app()
|
||||
|
||||
if __name__ == "__main__":
|
||||
app.run(debug=True)
|
||||
|
||||
@@ -1,8 +1,14 @@
|
||||
from flask import Flask
|
||||
from .controllers.top import top_bp
|
||||
import os
|
||||
|
||||
def create_app():
|
||||
app = Flask(__name__)
|
||||
app = Flask(
|
||||
'Muspah',
|
||||
template_folder=os.path.join(os.path.dirname(__file__), 'templates'),
|
||||
static_folder=os.path.join(os.path.dirname(__file__), 'static'),
|
||||
instance_relative_config=True
|
||||
)
|
||||
|
||||
app.register_blueprint(top_bp)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user