[Flask] Web media downloader frontend.
1
# -*- mode: python; -*-
2
3
"""This is the application factory.
4
5
When the mdl app package is imported, Flask uses the create_app
6
function to instantiate the web app.
7
8
"""
9
10
from flask import Flask
11
from flask_sqlalchemy import SQLAlchemy
12
from flask_login import LoginManager
13
14
from .models import db
15
16
17
defcreate_app():
18
app = (__name__)
19
app..("../config.py")
20
21
db.()
22
23
login_manager = ()
24
login_manager. = "auth.login"
25
login_manager.()
26
27
from .models import User
28
29
@login_manager.user_loader
30
defload_user(user_id):
31
return User..(int())
32
33
from .main import main
34
35
app.()
36
37
from .modules import common, auth
38
39
app.()
40
app.()
41
42
return app
43