Skip to content

Commit

Permalink
changed default db from tron --> data
Browse files Browse the repository at this point in the history
  • Loading branch information
emef committed Aug 27, 2012
1 parent cf19e94 commit 7d96df3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions sql.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
from django.db import connections, transaction, backend

def select_sql(sql, db='tron'):
def select_sql(sql, db='data'):
cursor = connections[db].cursor()
cursor.execute(sql)
transaction.commit_unless_managed(using=db)
return dictfetchall(cursor)

def cursor_sql(sql, db='tron'):
def cursor_sql(sql, db='data'):
cursor = connections[db].cursor()
cursor.execute(sql)
transaction.commit_unless_managed(using=db)
Expand All @@ -18,4 +18,4 @@ def dictfetchall(cursor):
return [
dict(zip([col[0] for col in desc], row))
for row in cursor.fetchall()
]
]

0 comments on commit 7d96df3

Please sign in to comment.