proper way to stash an object into the application registry?

5 views
Skip to first unread message

Jonathan Vanasco

unread,
Mar 30, 2020, 4:21:23 PM3/30/20
to pylons-discuss
I am decoupling some code from Pyramid and am creating a dict-like object to live alongside the traditional application "settings" object available as `config.registry.settings` and `request.registry.settings`.  I am basically moving the non-Pyramid-centric application settings out of the ISettings container and into another object.

Is it appropriate to simply stash this object into the "config.registry" during the `__init__.py` `main()` def, or must it be registered?

An alternative option could be to place it within the `request.registry.settings` object too. I would like to avoid that if possible, just because I think it could be too confusing for maintenance.
Reply all
Reply to author
Forward
0 new messages