From 6f5a6f5c9106965e6df13d063a3b05aab65712b1 Mon Sep 17 00:00:00 2001 From: Mathew Guest Date: Mon, 7 Mar 2022 12:05:38 -0700 Subject: [PATCH] backref to root app avail. in context --- README.md | 3 ++- app_skellington/app_container.py | 5 +++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 43541de..92859c9 100644 --- a/README.md +++ b/README.md @@ -65,7 +65,8 @@ License ------- I'm releasing this software under one of the most permissive licenses, the MIT software license. This applies to this source repository -and all files within it. +and all files within it. Alternatively, you are permitted you +to use any of this under the GPL to the fullest legal extent allowed. Notes ----- diff --git a/app_skellington/app_container.py b/app_skellington/app_container.py index 3c396c7..65e5e6d 100644 --- a/app_skellington/app_container.py +++ b/app_skellington/app_container.py @@ -57,6 +57,11 @@ class ApplicationContainer: logger.configure_logging() self.ctx = ApplicationContext(config, logger) + + # Reference to root_app avail. in context + self.ctx.root_app = self + + # Reference to context service avail. in root_app self['ctx'] = lambda: self.ctx self.cli = cli.CommandTree() # Command-line interface