Add rattail config object to Session kwargs
This commit is contained in:
parent
4c5bdc6766
commit
fa2c265e77
|
@ -2,7 +2,7 @@
|
||||||
################################################################################
|
################################################################################
|
||||||
#
|
#
|
||||||
# Rattail -- Retail Software Framework
|
# Rattail -- Retail Software Framework
|
||||||
# Copyright © 2010-2015 Lance Edgar
|
# Copyright © 2010-2016 Lance Edgar
|
||||||
#
|
#
|
||||||
# This file is part of Rattail.
|
# This file is part of Rattail.
|
||||||
#
|
#
|
||||||
|
@ -36,10 +36,14 @@ class ConfigExtension(BaseExtension):
|
||||||
"""
|
"""
|
||||||
Rattail config extension for Tailbone. Does the following:
|
Rattail config extension for Tailbone. Does the following:
|
||||||
|
|
||||||
|
* Adds the rattail config object to the constructor kwargs for the
|
||||||
|
underlying Session factory.
|
||||||
|
|
||||||
* Configures the main Tailbone database session so that it records
|
* Configures the main Tailbone database session so that it records
|
||||||
changes, if the config file so dictates.
|
changes, if the config file so dictates.
|
||||||
"""
|
"""
|
||||||
key = 'tailbone'
|
key = 'tailbone'
|
||||||
|
|
||||||
def configure(self, config):
|
def configure(self, config):
|
||||||
|
Session.configure(rattail_config=config)
|
||||||
configure_session(config, Session)
|
configure_session(config, Session)
|
||||||
|
|
Loading…
Reference in a new issue