wutta_continuum.conf¶
App Configuration
- class wutta_continuum.conf.WuttaContinuumConfigExtension[source]¶
App config extension for Wutta-Continuum.
This adds a startup hook, which can optionally turn on the SQLAlchemy-Continuum versioning features for the main app DB.
- startup(config)[source]¶
Perform final configuration setup for app startup.
This will do nothing at all, unless config enables the versioning feature. This must be done in config file and not in DB settings table:
[wutta_continuum] enable_versioning = true
Once enabled, this method will configure the integration, via these steps:
For more about SQLAlchemy-Continuum see Introduction.
- class wutta_continuum.conf.WuttaContinuumPlugin[source]¶
SQLAlchemy-Continuum manager plugin for Wutta-Continuum.
This tries to assign the current user and IP address to the transaction.
It will assume the “current machine” IP address, which may be suitable for some apps but not all (e.g. web apps, where IP address should reflect an arbitrary client machine).
However it does not actually have a way to determine the current user. WuttaWeb therefore uses a different plugin, based on this one, to get both the user and IP address from current request.
You can override this to use a custom plugin for this purpose; if so you must specify in your config file:
[wutta_continuum] wutta_plugin_spec = poser.db.continuum:PoserContinuumPlugin
See also the SQLAlchemy-Continuum docs for Plugins.