More standalone operation stuff.
Stop using `edbob.db.engine`, stop using all edbob templates, etc.
This commit is contained in:
parent
2a50e704ef
commit
7d19700c3c
22 changed files with 438 additions and 54 deletions
|
@ -31,7 +31,7 @@ from pyramid.config import Configurator
|
|||
import os.path
|
||||
import edbob
|
||||
|
||||
import edbob.db
|
||||
from sqlalchemy import engine_from_config
|
||||
from .db import Session
|
||||
from zope.sqlalchemy import ZopeTransactionExtension
|
||||
|
||||
|
@ -55,12 +55,11 @@ def main(global_config, **settings):
|
|||
|
||||
# Initialize edbob, dammit.
|
||||
edbob.init('rattail', os.path.abspath(settings['edbob.config']))
|
||||
edbob.init_modules(['edbob.time', 'edbob.db', 'rattail.db'])
|
||||
edbob.init_modules(['edbob.time'])
|
||||
|
||||
# Configure the primary database session. For now, this leverages edbob's
|
||||
# initialization to define the engine connection.
|
||||
assert edbob.db.engine
|
||||
Session.configure(bind=edbob.db.engine)
|
||||
# Configure the primary database session.
|
||||
engine = engine_from_config(settings)
|
||||
Session.configure(bind=engine)
|
||||
Session.configure(extension=ZopeTransactionExtension())
|
||||
|
||||
# Configure user authentication / authorization.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue