summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/toaster/toastergui/views.py
diff options
context:
space:
mode:
authorElliot Smith <elliot.smith@intel.com>2015-10-17 10:45:48 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-10-27 07:24:31 +0000
commitbbac0f092a20ab76be510d403fb946ea90f6597e (patch)
tree7cf6ba784f20cebac8e9448d02ce09ca3a506f13 /bitbake/lib/toaster/toastergui/views.py
parent851f0d82d9744e2eebb1f382a9963f3815b9822c (diff)
downloadpoky-bbac0f092a20ab76be510d403fb946ea90f6597e.tar.gz
bitbake: toaster: Add BUILD_MODE flag to context
We set a TOASTER_MANAGED env variable in the startup script, which has a value of "1" if Toaster should run in build mode. Add a BUILD_MODE variable to settings.py which is True if TOASTER_MANAGED is set to "1", False otherwise. Add this to the context for every template, so we can use this information to conditionally alter the content of pages according to the mode we're in. [YOCTO #8514] (Bitbake rev: f9cf4739fc85c9760ce748323dc7c8de3fa7eaec) Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: brian avery <avery.brian@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/toaster/toastergui/views.py')
-rwxr-xr-xbitbake/lib/toaster/toastergui/views.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/bitbake/lib/toaster/toastergui/views.py b/bitbake/lib/toaster/toastergui/views.py
index e2f2874539..10bbef5ca4 100755
--- a/bitbake/lib/toaster/toastergui/views.py
+++ b/bitbake/lib/toaster/toastergui/views.py
@@ -1880,6 +1880,10 @@ def managedcontextprocessor(request):
1880 "projects": projects, 1880 "projects": projects,
1881 "non_cli_projects": projects.exclude(is_default=True), 1881 "non_cli_projects": projects.exclude(is_default=True),
1882 "DEBUG" : toastermain.settings.DEBUG, 1882 "DEBUG" : toastermain.settings.DEBUG,
1883
1884 # True if Toaster is in build mode, False otherwise
1885 "BUILD_MODE": toastermain.settings.BUILD_MODE,
1886
1883 "CUSTOM_IMAGE" : toastermain.settings.CUSTOM_IMAGE, 1887 "CUSTOM_IMAGE" : toastermain.settings.CUSTOM_IMAGE,
1884 "TOASTER_BRANCH": toastermain.settings.TOASTER_BRANCH, 1888 "TOASTER_BRANCH": toastermain.settings.TOASTER_BRANCH,
1885 "TOASTER_REVISION" : toastermain.settings.TOASTER_REVISION, 1889 "TOASTER_REVISION" : toastermain.settings.TOASTER_REVISION,