Update directory structure for database plugins

This commit is contained in:
Nick Hall 2016-07-03 18:37:30 +01:00
parent 746cf0ee1e
commit 0719e04858
28 changed files with 6 additions and 7 deletions

View File

@ -19,5 +19,5 @@
#
from bsddb_support import DbBsddb
from gramps.plugins.db.bsddb import DbBsddb

View File

@ -38,7 +38,6 @@ from html import escape
#------------------------------------------------------------------------
from gramps.gen.db.generic import *
from gramps.gen.db.dbconst import DBLOGNAME
import dbapi_support
from gramps.gen.config import config
from gramps.gen.const import GRAMPS_LOCALE as glocale
_ = glocale.translation.gettext
@ -164,16 +163,16 @@ class DBAPI(DbGeneric):
settings = self.__parse_settings(settings_file)
if settings['dbtype'] == 'sqlite':
from dbapi_support.sqlite import Sqlite
from gramps.plugins.db.dbapi.sqlite import Sqlite
path_to_db = os.path.join(directory, 'sqlite.db')
self.dbapi = Sqlite(path_to_db)
elif settings['dbtype'] == 'mysql':
from dbapi_support.mysql import MySQL
from gramps.plugins.db.dbapi.mysql import MySQL
self.dbapi = MySQL(settings['host'], settings['user'],
settings['password'], settings['dbname'],
charset='utf8', use_unicode=True)
elif settings['dbtype'] == 'postgres':
from dbapi_support.postgresql import Postgresql
from gramps.plugins.db.dbapi.postgresql import Postgresql
self.dbapi = Postgresql(dbname=settings['dbname'],
user=settings['user'],
host=settings['host'],

View File

@ -18,8 +18,8 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
from dbapi import DBAPI
from dbapi_support.sqlite import Sqlite
from gramps.plugins.db.dbapi.dbapi import DBAPI
from gramps.plugins.db.dbapi.sqlite import Sqlite
from gramps.gen.db.generic import DbGeneric, DBBACKEND, LOG
import os
import glob