Browse Source

minor changes in db_uri

bugfixes
harshadyeola 10 years ago
parent
commit
4a7e02d708
  1. 1
      config/plugins.d/site.conf
  2. 3
      ee/core/database.py
  3. 2
      ee/core/variables.py

1
config/plugins.d/site.conf

@ -6,4 +6,3 @@
### `ee.cli.plugins.example` or from the file path
### `/var/lib/ee/plugins/example.py`
enable_plugin = true
db_path = sqlite:////var/lib/ee/ee.sqlite

3
ee/core/database.py

@ -2,9 +2,10 @@
from sqlalchemy import create_engine
from sqlalchemy.orm import scoped_session, sessionmaker
from sqlalchemy.ext.declarative import declarative_base
from ee.core.variables import EEVariables
# db_path = self.app.config.get('site', 'db_path')
engine = create_engine('sqlite:////var/lib/ee/ee.sqlite', convert_unicode=True)
engine = create_engine(EEVariables.ee_db_uri, convert_unicode=True)
db_session = scoped_session(sessionmaker(autocommit=False,
autoflush=False,
bind=engine))

2
ee/core/variables.py

@ -114,6 +114,8 @@ class EEVariables():
# Repo path
ee_repo_file = "ee-repo.list"
ee_repo_file_path = ("/etc/apt/sources.list.d/" + ee_repo_file)
basedir = os.path.abspath(os.path.dirname('/var/lib/ee/'))
ee_db_uri = 'sqlite:///' + os.path.join(basedir, 'ee.db')
def __init__(self):
pass

Loading…
Cancel
Save