-
Notifications
You must be signed in to change notification settings - Fork 0
/
tv.py
39 lines (26 loc) · 819 Bytes
/
tv.py
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# < ---------------------------------- > #
# Import required packages
from flask import Flask
from config import Config
from flask_login import LoginManager
from flask_sqlalchemy import SQLAlchemy
# < ---------------------------------- > #
# Flask app instance
app = Flask(__name__)
# < ---------------------------------- > #
# Load configurations
app.config.from_object(Config)
# < ---------------------------------- > #
# Set up database
db = SQLAlchemy(app)
from app import models
db.create_all()
# < ---------------------------------- > #
# Set up login manager
login_manager = LoginManager()
login_manager.init_app(app)
# < ---------------------------------- > #
# Import all the routes
from app.routes import app_routing
app.register_blueprint(app_routing)
# < ---------------------------------- > #