Muestra las diferencias entre dos versiones de la página.
| Ambos lados, revisión anterior Revisión previa Próxima revisión | Revisión previa | ||
|
comb:webapp0 [2014/08/02 07:54] alfred [Relationships with SQLAlchemy] |
comb:webapp0 [2020/05/09 09:25] (actual) |
||
|---|---|---|---|
| Línea 176: | Línea 176: | ||
| db.init_app(app) | db.init_app(app) | ||
| app.register_blueprint(reporting) | app.register_blueprint(reporting) | ||
| + | </code> | ||
| + | |||
| + | Another example: | ||
| + | <code python> | ||
| + | app = Flask(__name__, static_path='') | ||
| + | app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///digin.db' | ||
| + | db.init_app(app) | ||
| + | with app.app_context(): | ||
| + | db.create_all() | ||
| </code> | </code> | ||
| ===== HTML and JavaScript ===== | ===== HTML and JavaScript ===== | ||