All db operations now should go thru Database object

This commit is contained in:
Václav 'Ax' Hůla 2012-10-27 23:20:43 +02:00
parent ffa119e7f0
commit a4dbf3b77c
5 changed files with 128 additions and 100 deletions

View file

@ -5,6 +5,8 @@ import psycopg2
from PySide import QtCore, QtGui, QtDeclarative
from brmbar import Database
import brmbar
@ -173,7 +175,7 @@ class ShopAdapter(QtCore.QObject):
db.commit()
return balance
db = psycopg2.connect("dbname=brmbar")
db = Database.Database("dbname=brmbar")
shop = brmbar.Shop.new_with_defaults(db)
currency = shop.currency
db.commit()