path to document file is now configurable, flask secret is now also taken from configuration

This commit is contained in:
azivner
2017-08-15 22:57:44 -04:00
parent bd19dd3e55
commit c5660986d6
5 changed files with 32 additions and 15 deletions

View File

@@ -1,5 +1,5 @@
import sqlite3
import base64
import sqlite3
def dict_factory(cursor, row):
d = {}
@@ -11,8 +11,10 @@ def dict_factory(cursor, row):
return d
conn = sqlite3.connect('demo.ncdb')
conn.row_factory = dict_factory
def connect(documentPath):
global conn
conn = sqlite3.connect(documentPath)
conn.row_factory = dict_factory
def insert(tablename, rec):
keys = ','.join(rec.keys())