install final

This commit is contained in:
2026-04-26 13:08:22 +02:00
parent 648ead3a99
commit 3fa80819ee
13 changed files with 115 additions and 55 deletions
+9 -5
View File
@@ -20,7 +20,7 @@ print("Django BASE_DIR:", BASE_DIR)
PACKAGE_DIR = BASE_DIR.parent
APP_DATAS = PACKAGE_DIR / config('APP_DATAS')
print("Django application data:", APP_DATAS)
# Quick-start development settings - unsuitable for production
@@ -215,9 +215,13 @@ LOCALE_PATHS = (
STATIC_URL = '/static/'
STATIC_ROOT = APP_DATAS / 'staticfiles'
print("Django application STATIC_ROOT:", STATIC_ROOT)
MEDIA_URL = '/media/'
MEDIA_ROOT = APP_DATAS / 'media'
print("Django application MEDIA_ROOT:", MEDIA_ROOT)
"""
STATICFILES_DIRS = [
@@ -259,7 +263,7 @@ LOGGING = None if not IS_LOGGING else {
"encoding" : "utf-8",
},
'file': {
'level': 'INFO',
'level': 'DEBUG',
'class':'logging.handlers.RotatingFileHandler',
'filename': BASE_DIR / "logs" / LOGGING_FILE,
'maxBytes': 1024*1024*15, # 15MB
@@ -270,9 +274,9 @@ LOGGING = None if not IS_LOGGING else {
'console': {'class': 'logging.StreamHandler',},
},
'loggers': {
"django": {"handlers": ["null"], "level": "ERROR", "propagate": False,},
"uvicorn": {"handlers": ["null"], "level": "ERROR", "propagate": False,},
"daphne": {"handlers": ["null"], "level": "ERROR", "propagate": False,},
"django": {"handlers": ["file"], "level": "ERROR", "propagate": False,},
"uvicorn": {"handlers": ["file"], "level": "ERROR", "propagate": False,},
"daphne": {"handlers": ["file"], "level": "ERROR", "propagate": False,},
'axes': {"handlers": ['file',],"level": "INFO", "propagate": True, },
"celery": {"handlers": ["celery_file"], "level": "INFO", "propagate": False,},
"celery.task": {"handlers": ["celery_file"], "level": "INFO", "propagate": False, },
@@ -1,7 +1,7 @@
{% extends 'dashboard/base.html' %}
{% extends 'layout.html' %}
{% load i18n %}
{% block main_content %}
{% block content %}
<div class="w3-black w3-border w3-div-center" style="margin: 10em; height: 20em">
{% block main-bar %}
<div class="w3-orange">
@@ -1,7 +1,7 @@
{% extends 'dashboard/base.html' %}
{% extends 'layout.html' %}
{% load i18n %}
{% block main_content %}
{% block content %}
<div class="w3-black w3-border w3-div-center" style="margin: 10em; height: 20em">
{% block main-bar %}
<div class="w3-orange">
+1 -1
View File
@@ -36,7 +36,7 @@ urlpatterns += i18n_patterns(
path('login/', auth_views.LoginView.as_view(template_name='admin/login.html'), name='login'),
path('logout/', auth_views.LogoutView.as_view(), name='logout'),
path('', RedirectView.as_view(url='/scanner/main/', permanent=True), name='redirect_to_mainboard'),
path('', RedirectView.as_view(url='/scanner/calibration/', permanent=True), name='redirect_to_mainboard'),
path('scanner/', include('scanner.urls', namespace='scanner')),
)