aboutsummaryrefslogtreecommitdiffstats
path: root/bitbake/lib/toaster/toastermain/settings.py
diff options
context:
space:
mode:
authorAlexandru DAMIAN <alexandru.damian@intel.com>2014-06-26 15:21:42 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-07-14 14:10:03 +0100
commitcff19351a8b9d6267177dc548d994e3f28590391 (patch)
treef8fba60b5b395035c534f2169b3f3ea1e08905f9 /bitbake/lib/toaster/toastermain/settings.py
parent6b62a0fd6eb9a609f71857f5793b0696f7a790b4 (diff)
downloadopenembedded-core-contrib-cff19351a8b9d6267177dc548d994e3f28590391.tar.gz
bitbake: toaster: add project pages
We add the new project and project page skeletons. In the process, we add an identifier in the settings.py to detect whenever Toaster is running in managed mode, and a context processor to make this value available to the template processor. (Bitbake rev: 927a27c68e24cfe13f62ca5f0e60878b04fa4e24) Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/toaster/toastermain/settings.py')
-rw-r--r--bitbake/lib/toaster/toastermain/settings.py19
1 files changed, 15 insertions, 4 deletions
diff --git a/bitbake/lib/toaster/toastermain/settings.py b/bitbake/lib/toaster/toastermain/settings.py
index 97f2ff7cab..09ec2bda98 100644
--- a/bitbake/lib/toaster/toastermain/settings.py
+++ b/bitbake/lib/toaster/toastermain/settings.py
@@ -75,6 +75,11 @@ if 'DATABASE_URL' in os.environ:
raise Exception("FIXME: Please implement missing database url schema for url: %s" % dburl)
+if 'TOASTER_MANAGED' in os.environ and os.environ['TOASTER_MANAGED'] == "1":
+ MANAGED = True
+else:
+ MANAGED = False
+
# Allows current database settings to be exported as a DATABASE_URL environment variable value
def getDATABASE_URL():
@@ -221,12 +226,11 @@ TEMPLATE_CONTEXT_PROCESSORS = ('django.contrib.auth.context_processors.auth',
'django.core.context_processors.static',
'django.core.context_processors.tz',
'django.contrib.messages.context_processors.messages',
- "django.core.context_processors.request")
+ "django.core.context_processors.request",
+ 'toastergui.views.managedcontextprocessor',
+ )
INSTALLED_APPS = (
- #'django.contrib.auth',
- #'django.contrib.contenttypes',
- #'django.contrib.sessions',
#'django.contrib.sites',
#'django.contrib.messages',
'django.contrib.staticfiles',
@@ -243,6 +247,13 @@ INSTALLED_APPS = (
'bldcontrol',
)
+# if we run in managed mode, we need user support
+if MANAGED:
+ INSTALLED_APPS = ('django.contrib.auth',
+ 'django.contrib.contenttypes',
+ 'django.contrib.sessions',) + INSTALLED_APPS
+
+
# We automatically detect and install applications here if
# they have a 'models.py' or 'views.py' file
import os