summaryrefslogtreecommitdiff
path: root/poky/bitbake/lib/toaster/toastermain/settings.py
diff options
context:
space:
mode:
Diffstat (limited to 'poky/bitbake/lib/toaster/toastermain/settings.py')
-rw-r--r--poky/bitbake/lib/toaster/toastermain/settings.py13
1 files changed, 5 insertions, 8 deletions
diff --git a/poky/bitbake/lib/toaster/toastermain/settings.py b/poky/bitbake/lib/toaster/toastermain/settings.py
index b083cf5885..3c12359366 100644
--- a/poky/bitbake/lib/toaster/toastermain/settings.py
+++ b/poky/bitbake/lib/toaster/toastermain/settings.py
@@ -108,10 +108,6 @@ SITE_ID = 1
# to load the internationalization machinery.
USE_I18N = True
-# If you set this to False, Django will not format dates, numbers and
-# calendars according to the current locale.
-USE_L10N = True
-
# If you set this to False, Django will not use timezone-aware datetimes.
USE_TZ = True
@@ -152,6 +148,8 @@ STATICFILES_FINDERS = (
# Make this unique, and don't share it with anybody.
SECRET_KEY = 'NOT_SUITABLE_FOR_HOSTED_DEPLOYMENT'
+TMPDIR = os.environ.get('TOASTER_DJANGO_TMPDIR', '/tmp')
+
class InvalidString(str):
def __mod__(self, other):
from django.template.base import TemplateSyntaxError
@@ -218,7 +216,7 @@ CACHES = {
# },
'default': {
'BACKEND': 'django.core.cache.backends.filebased.FileBasedCache',
- 'LOCATION': '/tmp/toaster_cache_%d' % os.getuid(),
+ 'LOCATION': '%s/toaster_cache_%d' % (TMPDIR, os.getuid()),
'TIMEOUT': 1,
}
}
@@ -316,12 +314,12 @@ for t in os.walk(os.path.dirname(currentdir)):
LOGGING = LOGGING_SETTINGS
# Build paths inside the project like this: BASE_DIR / 'subdir'.
-BASE_DIR = Path(__file__).resolve(strict=True).parent.parent
+BUILDDIR = os.environ.get("BUILDDIR", TMPDIR)
# LOG VIEWER
# https://pypi.org/project/django-log-viewer/
LOG_VIEWER_FILES_PATTERN = '*.log*'
-LOG_VIEWER_FILES_DIR = os.path.join(BASE_DIR, 'logs')
+LOG_VIEWER_FILES_DIR = os.path.join(BUILDDIR, "toaster_logs/")
LOG_VIEWER_PAGE_LENGTH = 25 # total log lines per-page
LOG_VIEWER_MAX_READ_LINES = 100000 # total log lines will be read
LOG_VIEWER_PATTERNS = ['INFO', 'DEBUG', 'WARNING', 'ERROR', 'CRITICAL']
@@ -329,7 +327,6 @@ LOG_VIEWER_PATTERNS = ['INFO', 'DEBUG', 'WARNING', 'ERROR', 'CRITICAL']
# Optionally you can set the next variables in order to customize the admin:
LOG_VIEWER_FILE_LIST_TITLE = "Logs list"
-
if DEBUG and SQL_DEBUG:
LOGGING['loggers']['django.db.backends'] = {
'level': 'DEBUG',