File tree Expand file tree Collapse file tree 3 files changed +4
-2
lines changed Expand file tree Collapse file tree 3 files changed +4
-2
lines changed Original file line number Diff line number Diff line change 66### `ee.cli.plugins.example` or from the file path
77### `/var/lib/ee/plugins/example.py`
88enable_plugin = true
9- db_path = sqlite:////var/lib/ee/ee.sqlite
Original file line number Diff line number Diff line change 22from sqlalchemy import create_engine
33from sqlalchemy .orm import scoped_session , sessionmaker
44from sqlalchemy .ext .declarative import declarative_base
5+ from ee .core .variables import EEVariables
56
67# db_path = self.app.config.get('site', 'db_path')
7- engine = create_engine ('sqlite:////var/lib/ee/ee.sqlite' , convert_unicode = True )
8+ engine = create_engine (EEVariables . ee_db_uri , convert_unicode = True )
89db_session = scoped_session (sessionmaker (autocommit = False ,
910 autoflush = False ,
1011 bind = engine ))
Original file line number Diff line number Diff line change @@ -114,6 +114,8 @@ class EEVariables():
114114 # Repo path
115115 ee_repo_file = "ee-repo.list"
116116 ee_repo_file_path = ("/etc/apt/sources.list.d/" + ee_repo_file )
117+ basedir = os .path .abspath (os .path .dirname ('/var/lib/ee/' ))
118+ ee_db_uri = 'sqlite:///' + os .path .join (basedir , 'ee.db' )
117119
118120 def __init__ (self ):
119121 pass
You can’t perform that action at this time.
0 commit comments