Moved logging, added django-unfold admin and cleaned up spacing
This commit is contained in:
parent
3361906784
commit
e56155d0e6
2 changed files with 27 additions and 29 deletions
|
|
@ -1,12 +1,11 @@
|
||||||
import os
|
import os
|
||||||
|
|
||||||
from django.core.asgi import get_asgi_application
|
|
||||||
|
|
||||||
from channels.auth import AuthMiddlewareStack
|
from channels.auth import AuthMiddlewareStack
|
||||||
from channels.routing import ProtocolTypeRouter, URLRouter
|
from channels.routing import ProtocolTypeRouter, URLRouter
|
||||||
from channels.security.websocket import AllowedHostsOriginValidator
|
from channels.security.websocket import AllowedHostsOriginValidator
|
||||||
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'config.settings')
|
from django.core.asgi import get_asgi_application
|
||||||
|
|
||||||
|
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'config.settings')
|
||||||
django_asgi_app = get_asgi_application()
|
django_asgi_app = get_asgi_application()
|
||||||
|
|
||||||
from apps.onboarding.routing import websocket_urlpatterns
|
from apps.onboarding.routing import websocket_urlpatterns
|
||||||
|
|
|
||||||
|
|
@ -53,9 +53,8 @@ if any(arg.startswith('test') for arg in sys.argv):
|
||||||
DB_HOST = None
|
DB_HOST = None
|
||||||
DB_PORT = None
|
DB_PORT = None
|
||||||
|
|
||||||
OVERRIDE_APPS = [
|
OVERRIDE_APPS = [
|
||||||
|
'unfold',
|
||||||
|
|
||||||
'daphne',
|
'daphne',
|
||||||
]
|
]
|
||||||
DJANGO_APPS = [
|
DJANGO_APPS = [
|
||||||
|
|
@ -181,6 +180,29 @@ REST_FRAMEWORK = {
|
||||||
],
|
],
|
||||||
}
|
}
|
||||||
|
|
||||||
|
LOGGING = {
|
||||||
|
'version': 1,
|
||||||
|
'disable_existing_loggers': False,
|
||||||
|
'formatters': {
|
||||||
|
'standard': {
|
||||||
|
'format': '%(asctime)s [%(levelname)s] %(name)s: %(message)s',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
'handlers': {
|
||||||
|
'console': {
|
||||||
|
'class': 'logging.StreamHandler',
|
||||||
|
'formatter': 'standard',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
'loggers': {
|
||||||
|
'apps.onboarding': {
|
||||||
|
'handlers': ['console'],
|
||||||
|
'level': 'INFO',
|
||||||
|
'propagate': False,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
CELERY_BROKER_URL = DJANGO_CELERY_BROKER_URL
|
CELERY_BROKER_URL = DJANGO_CELERY_BROKER_URL
|
||||||
CELERY_RESULT_BACKEND = 'django-db'
|
CELERY_RESULT_BACKEND = 'django-db'
|
||||||
CELERY_CACHE_BACKEND = 'django-cache'
|
CELERY_CACHE_BACKEND = 'django-cache'
|
||||||
|
|
@ -215,26 +237,3 @@ if DEBUG:
|
||||||
CORS_ALLOWED_ORIGINS.append(f'http://{DOMAIN_NAME}:8000')
|
CORS_ALLOWED_ORIGINS.append(f'http://{DOMAIN_NAME}:8000')
|
||||||
CSRF_TRUSTED_ORIGINS.append(f'http://{DOMAIN_NAME}:5173')
|
CSRF_TRUSTED_ORIGINS.append(f'http://{DOMAIN_NAME}:5173')
|
||||||
CSRF_TRUSTED_ORIGINS.append(f'http://{DOMAIN_NAME}:8000')
|
CSRF_TRUSTED_ORIGINS.append(f'http://{DOMAIN_NAME}:8000')
|
||||||
|
|
||||||
LOGGING = {
|
|
||||||
'version': 1,
|
|
||||||
'disable_existing_loggers': False,
|
|
||||||
'formatters': {
|
|
||||||
'standard': {
|
|
||||||
'format': '%(asctime)s [%(levelname)s] %(name)s: %(message)s',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
'handlers': {
|
|
||||||
'console': {
|
|
||||||
'class': 'logging.StreamHandler',
|
|
||||||
'formatter': 'standard',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
'loggers': {
|
|
||||||
'apps.onboarding': {
|
|
||||||
'handlers': ['console'],
|
|
||||||
'level': 'INFO',
|
|
||||||
'propagate': False,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue