13 lines
337 B
Python
13 lines
337 B
Python
|
from flask import Flask
|
||
|
from flask.ext.sqlalchemy import SQLAlchemy
|
||
|
from sqlalchemy.orm import sessionmaker
|
||
|
|
||
|
app = Flask(__name__)
|
||
|
|
||
|
app.config['SQLALCHEMY_DATABASE_URI'] = 'postgresql://accountant:accountant@localhost/accountant'
|
||
|
app.config['SQLALCHEMY_RECORD_QUERIES'] = True
|
||
|
|
||
|
db = SQLAlchemy(app)
|
||
|
session = db.create_scoped_session()
|
||
|
|