forked from 3wordchant/capsul-flask
first try at creating VirtualizationInterface
This commit is contained in:
@ -8,7 +8,7 @@ from psycopg2 import pool
|
||||
from flask import current_app
|
||||
from flask import g
|
||||
|
||||
from capsulflask.model import Model
|
||||
from capsulflask.db_model import DBModel
|
||||
|
||||
def init_app(app):
|
||||
databaseUrl = urlparse(app.config['DATABASE_URL'])
|
||||
@ -111,8 +111,8 @@ def get_model():
|
||||
if 'model' not in g:
|
||||
connection = current_app.config['PSYCOPG2_CONNECTION_POOL'].getconn()
|
||||
cursor = connection.cursor()
|
||||
g.model = Model(connection, cursor)
|
||||
return g.model
|
||||
g.db_model = DBModel(connection, cursor)
|
||||
return g.db_model
|
||||
|
||||
|
||||
def close_db(e=None):
|
||||
|
Reference in New Issue
Block a user