Put authentication database path in ini file

This commit is contained in:
jdoe0
2013-08-02 01:30:04 +07:00
parent f17ccd954c
commit f4cfde621e
2 changed files with 3 additions and 1 deletions

View File

@@ -99,6 +99,7 @@ class SyncApp(object):
self.data_root = os.path.abspath(kw.get('data_root', '.'))
self.base_url = kw.get('base_url', '/')
self.auth_db_path = os.path.abspath(kw.get('auth_db_path', '.'))
self.sessions = {}
try:
@@ -119,7 +120,7 @@ class SyncApp(object):
Override this to change how users are authenticated.
"""
conn = sqlite3.connect("auth.db")
conn = sqlite3.connect(self.auth_db_path)
cursor = conn.cursor()
param = (username,)