summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/toaster/toastermain/settings.py
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/lib/toaster/toastermain/settings.py')
-rw-r--r--bitbake/lib/toaster/toastermain/settings.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/bitbake/lib/toaster/toastermain/settings.py b/bitbake/lib/toaster/toastermain/settings.py
index 69aa5a10c0..3c12359366 100644
--- a/bitbake/lib/toaster/toastermain/settings.py
+++ b/bitbake/lib/toaster/toastermain/settings.py
@@ -148,6 +148,8 @@ STATICFILES_FINDERS = (
148# Make this unique, and don't share it with anybody. 148# Make this unique, and don't share it with anybody.
149SECRET_KEY = 'NOT_SUITABLE_FOR_HOSTED_DEPLOYMENT' 149SECRET_KEY = 'NOT_SUITABLE_FOR_HOSTED_DEPLOYMENT'
150 150
151TMPDIR = os.environ.get('TOASTER_DJANGO_TMPDIR', '/tmp')
152
151class InvalidString(str): 153class InvalidString(str):
152 def __mod__(self, other): 154 def __mod__(self, other):
153 from django.template.base import TemplateSyntaxError 155 from django.template.base import TemplateSyntaxError
@@ -214,7 +216,7 @@ CACHES = {
214 # }, 216 # },
215 'default': { 217 'default': {
216 'BACKEND': 'django.core.cache.backends.filebased.FileBasedCache', 218 'BACKEND': 'django.core.cache.backends.filebased.FileBasedCache',
217 'LOCATION': '/tmp/toaster_cache_%d' % os.getuid(), 219 'LOCATION': '%s/toaster_cache_%d' % (TMPDIR, os.getuid()),
218 'TIMEOUT': 1, 220 'TIMEOUT': 1,
219 } 221 }
220 } 222 }
@@ -312,7 +314,7 @@ for t in os.walk(os.path.dirname(currentdir)):
312LOGGING = LOGGING_SETTINGS 314LOGGING = LOGGING_SETTINGS
313 315
314# Build paths inside the project like this: BASE_DIR / 'subdir'. 316# Build paths inside the project like this: BASE_DIR / 'subdir'.
315BUILDDIR = os.environ.get("BUILDDIR", "/tmp") 317BUILDDIR = os.environ.get("BUILDDIR", TMPDIR)
316 318
317# LOG VIEWER 319# LOG VIEWER
318# https://pypi.org/project/django-log-viewer/ 320# https://pypi.org/project/django-log-viewer/
@@ -325,7 +327,6 @@ LOG_VIEWER_PATTERNS = ['INFO', 'DEBUG', 'WARNING', 'ERROR', 'CRITICAL']
325# Optionally you can set the next variables in order to customize the admin: 327# Optionally you can set the next variables in order to customize the admin:
326LOG_VIEWER_FILE_LIST_TITLE = "Logs list" 328LOG_VIEWER_FILE_LIST_TITLE = "Logs list"
327 329
328
329if DEBUG and SQL_DEBUG: 330if DEBUG and SQL_DEBUG:
330 LOGGING['loggers']['django.db.backends'] = { 331 LOGGING['loggers']['django.db.backends'] = {
331 'level': 'DEBUG', 332 'level': 'DEBUG',