mirror of
https://github.com/TriliumNext/Notes.git
synced 2026-01-27 15:48:31 -06:00
path to document file is now configurable, flask secret is now also taken from configuration
This commit is contained in:
@@ -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())
|
||||
|
||||
Reference in New Issue
Block a user