Put authentication database path in ini file
This commit is contained in:
parent
f17ccd954c
commit
f4cfde621e
@ -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,)
|
||||
|
||||
|
||||
@ -24,6 +24,7 @@ logging.config_file = logging.conf
|
||||
use = egg:AnkiServer#sync_app
|
||||
data_root = ./collections
|
||||
base_url = /sync/
|
||||
auth_db_path = ./auth.db
|
||||
mysql.host = 127.0.0.1
|
||||
mysql.user = db_user
|
||||
mysql.passwd = db_password
|
||||
|
||||
Loading…
Reference in New Issue
Block a user