merge develop-1.0
This commit is contained in:
		@ -10,11 +10,7 @@ sys.path.insert(1, os.path.dirname(os.path.realpath(__file__)))
 | 
			
		||||
PROJECT_ROOT = os.path.abspath(__file__ + "/../../../")
 | 
			
		||||
 | 
			
		||||
# DEBUG mode
 | 
			
		||||
DEBUG = (
 | 
			
		||||
    (os.environ["AIRCOX_DEBUG"].lower() in ("true", 1))
 | 
			
		||||
    if "AIRCOX_DEBUG" in os.environ
 | 
			
		||||
    else False
 | 
			
		||||
)
 | 
			
		||||
DEBUG = (os.environ["AIRCOX_DEBUG"].lower() in ("true", 1)) if "AIRCOX_DEBUG" in os.environ else False
 | 
			
		||||
 | 
			
		||||
# Internationalization and timezones: thoses values may be set in order to
 | 
			
		||||
# have correct translation and timezone.
 | 
			
		||||
@ -74,9 +70,7 @@ try:
 | 
			
		||||
except Exception:
 | 
			
		||||
    print(
 | 
			
		||||
        "Can not set locale {LC}. Is it available on you system? Hint: "
 | 
			
		||||
        "Check /etc/locale.gen and rerun locale-gen as sudo if needed.".format(
 | 
			
		||||
            LC=LANGUAGE_CODE
 | 
			
		||||
        )
 | 
			
		||||
        "Check /etc/locale.gen and rerun locale-gen as sudo if needed.".format(LC=LANGUAGE_CODE)
 | 
			
		||||
    )
 | 
			
		||||
    pass
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -7,6 +7,7 @@ try:
 | 
			
		||||
except ImportError:
 | 
			
		||||
    pass
 | 
			
		||||
 | 
			
		||||
DEBUG = True
 | 
			
		||||
 | 
			
		||||
LOCALE_PATHS = ["aircox/locale", "aircox_streamer/locale"]
 | 
			
		||||
 | 
			
		||||
@ -15,7 +16,7 @@ LOGGING = {
 | 
			
		||||
    "disable_existing_loggers": False,
 | 
			
		||||
    "formatters": {
 | 
			
		||||
        "timestamp": {
 | 
			
		||||
            "format": "{asctime} {levelname} {message}",
 | 
			
		||||
            "format": "{asctime} {module} {levelname} {message}",
 | 
			
		||||
            "style": "{",
 | 
			
		||||
        },
 | 
			
		||||
    },
 | 
			
		||||
@ -26,6 +27,10 @@ LOGGING = {
 | 
			
		||||
        },
 | 
			
		||||
    },
 | 
			
		||||
    "loggers": {
 | 
			
		||||
        "root": {
 | 
			
		||||
            "handlers": ["console"],
 | 
			
		||||
            "level": os.getenv("DJANGO_LOG_LEVEL", "DEBUG"),
 | 
			
		||||
        },
 | 
			
		||||
        "aircox": {
 | 
			
		||||
            "handlers": ["console"],
 | 
			
		||||
            "level": os.getenv("DJANGO_LOG_LEVEL", "DEBUG"),
 | 
			
		||||
@ -40,3 +45,9 @@ LOGGING = {
 | 
			
		||||
        },
 | 
			
		||||
    },
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
CACHES = {
 | 
			
		||||
    "default": {
 | 
			
		||||
        "BACKEND": "django.core.cache.backends.locmem.LocMemCache",
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@ -10,6 +10,7 @@ For Django settings see:
 | 
			
		||||
    https://docs.djangoproject.com/en/3.1/topics/settings/
 | 
			
		||||
    https://docs.djangoproject.com/en/3.1/ref/settings/
 | 
			
		||||
"""
 | 
			
		||||
from django.utils import timezone
 | 
			
		||||
from zoneinfo import ZoneInfo
 | 
			
		||||
from .prod import *
 | 
			
		||||
 | 
			
		||||
@ -43,8 +44,6 @@ try:
 | 
			
		||||
except Exception:
 | 
			
		||||
    print(
 | 
			
		||||
        "Can not set locale {LC}. Is it available on you system? Hint: "
 | 
			
		||||
        "Check /etc/locale.gen and rerun locale-gen as sudo if needed.".format(
 | 
			
		||||
            LC=LANGUAGE_CODE
 | 
			
		||||
        )
 | 
			
		||||
        "Check /etc/locale.gen and rerun locale-gen as sudo if needed.".format(LC=LANGUAGE_CODE)
 | 
			
		||||
    )
 | 
			
		||||
    pass
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user