34 lines
994 B
Python
34 lines
994 B
Python
#
|
|
# Copyright (c) 2024 bartholin
|
|
#
|
|
# This program is free software: you can redistribute it and/or modify
|
|
# it under the terms of the GNU General Public License as published by
|
|
# the Free Software Foundation, either version 3 of the License, or
|
|
# (at your option) any later version.
|
|
#
|
|
# This program is distributed in the hope that it will be useful, but
|
|
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
# General Public License for more details.
|
|
#
|
|
# You should have received a copy of the GNU General Public License
|
|
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
#
|
|
|
|
import os
|
|
from dotenv import load_dotenv
|
|
from flask import Flask
|
|
|
|
from kinolist import pages, database, login
|
|
|
|
load_dotenv()
|
|
|
|
def create_app():
|
|
app = Flask(__name__)
|
|
app.config.from_prefixed_env()
|
|
login.login_manager.init_app(app)
|
|
database.init_app(app)
|
|
|
|
app.register_blueprint(pages.bp)
|
|
return app
|