diff options
author | Alexandru DAMIAN <alexandru.damian@intel.com> | 2015-02-06 15:32:18 +0000 |
---|---|---|
committer | Alexandru DAMIAN <alexandru.damian@intel.com> | 2015-02-09 17:54:34 +0000 |
commit | 93e4f8c44273f4657c5be4c00b61db12aa875e31 (patch) | |
tree | fd9c093c47e2104401df54cdcc40f3ff2c47c420 /lib/toaster/toastermain | |
parent | 8a8248f7b7e30469f592e2f8adbf6ce21e8685c5 (diff) | |
download | bitbake-93e4f8c44273f4657c5be4c00b61db12aa875e31.tar.gz |
toaster: display Toaster mode and version in debug mode
This patch displays the current running mode and checked-out git branch
as Toaster version when running in debug mode.
Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Diffstat (limited to 'lib/toaster/toastermain')
-rw-r--r-- | lib/toaster/toastermain/settings.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/toaster/toastermain/settings.py b/lib/toaster/toastermain/settings.py index ea7c3534d..b6a42c062 100644 --- a/lib/toaster/toastermain/settings.py +++ b/lib/toaster/toastermain/settings.py @@ -211,8 +211,6 @@ MIDDLEWARE_CLASSES = ( 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', - 'django.middleware.cache.UpdateCacheMiddleware', - 'django.middleware.cache.FetchFromCacheMiddleware', # Uncomment the next line for simple clickjacking protection: # 'django.middleware.clickjacking.XFrameOptionsMiddleware', ) @@ -233,6 +231,9 @@ CACHES = { from os.path import dirname as DN SITE_ROOT=DN(DN(os.path.abspath(__file__))) +import subprocess +TOASTER_VERSION = subprocess.Popen('cd %s; git branch | grep "^* " | tr -d "* "' % SITE_ROOT, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE).communicate()[0] + ROOT_URLCONF = 'toastermain.urls' # Python dotted path to the WSGI application used by Django's runserver. |