mirror of
https://github.com/rmontanana/microblog.git
synced 2025-08-16 15:55:51 +00:00
Chapter 4
This commit is contained in:
15
app/__init__.py
Normal file
15
app/__init__.py
Normal file
@@ -0,0 +1,15 @@
|
||||
from flask import Flask
|
||||
from config import Config
|
||||
from flask_sqlalchemy import SQLAlchemy
|
||||
from flask_migrate import Migrate
|
||||
|
||||
app = Flask(__name__)
|
||||
app.config.from_object(Config)
|
||||
|
||||
# Puestos fuera del tutorial
|
||||
app.jinja_env.auto_reload = True
|
||||
app.config["TEMPLATES_AUTO_RELOAD"] = True
|
||||
db = SQLAlchemy(app)
|
||||
migrate = Migrate(app, db)
|
||||
|
||||
from app import routes, models
|
Reference in New Issue
Block a user