From dcc9a3ee564ba0ae0a3e134e1aaa214f58feb677 Mon Sep 17 00:00:00 2001 From: zakhy <=> Date: Tue, 8 Apr 2025 12:13:14 +0700 Subject: [PATCH] =?UTF-8?q?=D0=9D=D0=B0=D1=81=D1=82=D1=80=D0=BE=D0=B9?= =?UTF-8?q?=D0=BA=D0=B8=20=D0=B4=D0=BB=D1=8F=20=D0=B4=D0=B5=D0=BF=D0=BB?= =?UTF-8?q?=D0=BE=D1=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .pre-commit-config.yaml | 2 +- positioning/project/settings/base.py | 12 ++++++++++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 6f41f6f..f75f5df 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -58,7 +58,7 @@ repos: - flake8-string-format==0.3.0 - flake8-variables-names==0.0.5 args: [ - "--max-line-length=88", + "--max-line-length=115", "--ignore=E203,W503, CCE001", "--max-complexity=10", "--jobs=1", diff --git a/positioning/project/settings/base.py b/positioning/project/settings/base.py index b08a240..c08a319 100644 --- a/positioning/project/settings/base.py +++ b/positioning/project/settings/base.py @@ -60,9 +60,9 @@ USE_I18N = True TIME_ZONE = os.environ.get("TZ", "UTC") TIME_ZONE_OBJECT = zoneinfo.ZoneInfo(TIME_ZONE) -STATIC_URL = "static/" +STATIC_URL = "/mfss-positioning/static/" -MEDIA_URL = "/media/" +MEDIA_URL = "/mfss-positioning/media/" MEDIA_ROOT = os.path.join(os.path.dirname(BASE_DIR), "media") DEFAULT_AUTO_FIELD = "django.db.models.BigAutoField" @@ -77,3 +77,11 @@ GDAL_LIBRARY_PATH = os.getenv("GDAL_LIBRARY_PATH") GEOS_LIBRARY_PATH = os.getenv("GEOS_LIBRARY_PATH") X_FRAME_OPTIONS = "SAMEORIGIN" + +# Настройки для деплоя + +SESSION_COOKIE_NAME = "mfss_pos_session" + +CSRF_TRUSTED_ORIGINS = ["http://192.168.10.3:8095", "http://0.0.0.0:8000"] + +FORCE_SCRIPT_NAME = "/mfss-positioning"