41 lines
1.3 KiB
Python
41 lines
1.3 KiB
Python
"""
|
|
This file is part of Accountant.
|
|
|
|
Accountant is free software: you can redistribute it and/or modify
|
|
it under the terms of the GNU Affero General Public License as published by
|
|
the Free Software Foundation, either version 3 of the License, or
|
|
(at your option) any later version.
|
|
|
|
Accountant 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 Affero General Public License for more details.
|
|
|
|
You should have received a copy of the GNU Affero General Public License
|
|
along with Accountant. If not, see <http://www.gnu.org/licenses/>.
|
|
"""
|
|
|
|
from api import api
|
|
#from api.controller import login_manager
|
|
from api.model import db
|
|
from flask import Flask
|
|
from flask.ext.sqlalchemy import SQLAlchemy
|
|
from frontend import frontend
|
|
from sqlalchemy.orm import sessionmaker
|
|
import config
|
|
|
|
# The app
|
|
app = Flask(__name__, static_folder = None)
|
|
|
|
app.config['SQLALCHEMY_DATABASE_URI'] = config.db_uri
|
|
app.config['SQLALCHEMY_RECORD_QUERIES'] = config.debug
|
|
app.config['WTF_CSRF_ENABLED'] = False
|
|
app.config['SECRET_KEY'] = 'my_secret_key'
|
|
|
|
db.init_app(app)
|
|
#login_manager.init_app(app)
|
|
|
|
app.register_blueprint(frontend, url_prefix='')
|
|
app.register_blueprint(api, url_prefix='/api')
|
|
|