forked from ThePhrontistery/alabar-python
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp.py
More file actions
25 lines (19 loc) · 739 Bytes
/
app.py
File metadata and controls
25 lines (19 loc) · 739 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
from flask import Flask, redirect, render_template, request, session, url_for
from flask_sqlalchemy import SQLAlchemy
from alabar.models import init_app
app = Flask(__name__)
# The SECRET_KEY is used to encrypt session data in (persistent) cookies.
# >>> import secrets; secrets.token_hex(32)
app.config['SECRET_KEY'] = '642918690903c342d812d16cd33a4de4c8692483462550c9ddcd4303621cc1b2'
app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///alabar.db'
# app.config['EXPLAIN_TEMPLATE_LOADING'] = True
db = init_app(app)
#app.register_blueprint(crewverve_bp)
#app.register_blueprint(admin_bp)
app.app_context().push()
db.create_all()
@app.route('/')
def index():
return "Hola mundo"
if __name__ == '__main__':
app.run(debug=True)