mirror of
https://github.com/brmlab/brmbar.git
synced 2025-06-07 21:04:00 +02:00
brmbar-tui.py: Use brmbar.Database instead of psycopg2 directly
This commit is contained in:
parent
5f4c4cb5ca
commit
ff915072a0
1 changed files with 3 additions and 2 deletions
|
@ -1,11 +1,12 @@
|
||||||
#!/usr/bin/python3
|
#!/usr/bin/python3
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
import psycopg2
|
|
||||||
|
from brmbar import Database
|
||||||
|
|
||||||
import brmbar
|
import brmbar
|
||||||
|
|
||||||
db = psycopg2.connect("dbname=brmbar")
|
db = Database.Database("dbname=brmbar")
|
||||||
shop = brmbar.Shop.new_with_defaults(db)
|
shop = brmbar.Shop.new_with_defaults(db)
|
||||||
currency = shop.currency
|
currency = shop.currency
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue