feat: add whitenoise for static files serving
Some checks failed
CI/CD Pipeline / Build Docker Images (push) Has been cancelled
CI/CD Pipeline / Push to Gitea Registry (push) Has been cancelled
CI/CD Pipeline / Deploy to Server (push) Has been cancelled
CI/CD Pipeline / Code Quality Checks (push) Has been cancelled
CI/CD Pipeline / Run Tests (push) Has been cancelled

This commit is contained in:
2026-02-02 15:45:20 +01:00
parent 80c01f2df1
commit e6af252f29
3 changed files with 24 additions and 160 deletions

View File

@@ -51,6 +51,7 @@ dependencies = [
"django-jazzmin>=2.6.2", "django-jazzmin>=2.6.2",
"playwright>=1.57.0", "playwright>=1.57.0",
"pylint>=3.0", "pylint>=3.0",
"whitenoise>=6.11.0",
] ]
[project.optional-dependencies] [project.optional-dependencies]

View File

@@ -1,13 +1,14 @@
# This file was autogenerated by uv via the following command: # This file was autogenerated by uv via the following command:
# uv export --no-hashes # uv export --no-hashes --no-dev
alabaster==0.7.16 -e .
# via sphinx
amqp==5.3.1 amqp==5.3.1
# via kombu # via kombu
asgiref==3.11.0 asgiref==3.11.0
# via # via
# django # django
# django-cors-headers # django-cors-headers
astroid==4.0.3
# via pylint
async-timeout==5.0.1 ; python_full_version < '3.11.3' async-timeout==5.0.1 ; python_full_version < '3.11.3'
# via redis # via redis
attrs==25.4.0 attrs==25.4.0
@@ -18,19 +19,14 @@ attrs==25.4.0
# twisted # twisted
automat==25.4.16 automat==25.4.16
# via twisted # via twisted
babel==2.17.0
# via sphinx
bandit==1.7.5
beautifulsoup4==4.12.3 beautifulsoup4==4.12.3
# via mostovik-backend # via mostovik-backend
billiard==4.2.4 billiard==4.2.4
# via celery # via celery
black==23.12.1
celery==5.3.6 celery==5.3.6
# via # via
# django-celery-beat # django-celery-beat
# django-celery-results # django-celery-results
# flower
# mostovik-backend # mostovik-backend
certifi==2026.1.4 certifi==2026.1.4
# via # via
@@ -39,20 +35,15 @@ certifi==2026.1.4
cffi==2.0.0 ; (implementation_name != 'pypy' and os_name == 'nt') or platform_python_implementation != 'PyPy' cffi==2.0.0 ; (implementation_name != 'pypy' and os_name == 'nt') or platform_python_implementation != 'PyPy'
# via # via
# cryptography # cryptography
# gevent
# trio # trio
cfgv==3.5.0
# via pre-commit
charset-normalizer==3.4.4 charset-normalizer==3.4.4
# via requests # via requests
click==8.1.7 click==8.1.7
# via # via
# black
# celery # celery
# click-didyoumean # click-didyoumean
# click-plugins # click-plugins
# click-repl # click-repl
# typer
click-didyoumean==0.3.1 click-didyoumean==0.3.1
# via celery # via celery
click-plugins==1.1.1.2 click-plugins==1.1.1.2
@@ -61,10 +52,8 @@ click-repl==0.3.0
# via celery # via celery
colorama==0.4.6 ; sys_platform == 'win32' colorama==0.4.6 ; sys_platform == 'win32'
# via # via
# bandit
# click # click
# pytest # pylint
# sphinx
constantly==23.10.4 constantly==23.10.4
# via twisted # via twisted
coreapi==2.3.3 coreapi==2.3.3
@@ -74,8 +63,6 @@ coreapi==2.3.3
# openapi-codec # openapi-codec
coreschema==0.0.4 coreschema==0.0.4
# via coreapi # via coreapi
coverage==7.4.0
# via pytest-cov
cron-descriptor==2.0.6 cron-descriptor==2.0.6
# via django-celery-beat # via django-celery-beat
cryptography==42.0.5 cryptography==42.0.5
@@ -90,20 +77,16 @@ cssselect==1.3.0
# scrapy # scrapy
defusedxml==0.7.1 defusedxml==0.7.1
# via scrapy # via scrapy
distlib==0.4.0 dill==0.4.1
# via virtualenv # via pylint
django==3.2.25 django==3.2.25
# via # via
# django-celery-beat # django-celery-beat
# django-celery-results # django-celery-results
# django-cors-headers # django-cors-headers
# django-debug-toolbar
# django-extensions
# django-filter # django-filter
# django-jazzmin # django-jazzmin
# django-redis # django-redis
# django-stubs
# django-stubs-ext
# django-timezone-field # django-timezone-field
# djangorestframework # djangorestframework
# djangorestframework-simplejwt # djangorestframework-simplejwt
@@ -116,8 +99,6 @@ django-celery-results==2.5.1
# via mostovik-backend # via mostovik-backend
django-cors-headers==4.3.1 django-cors-headers==4.3.1
# via mostovik-backend # via mostovik-backend
django-debug-toolbar==4.2.0
django-extensions==3.2.3
django-filter==23.5 django-filter==23.5
# via mostovik-backend # via mostovik-backend
django-jazzmin==2.6.2 django-jazzmin==2.6.2
@@ -126,9 +107,6 @@ django-redis==5.4.0
# via mostovik-backend # via mostovik-backend
django-rest-swagger==2.2.0 django-rest-swagger==2.2.0
# via mostovik-backend # via mostovik-backend
django-stubs==4.2.7
django-stubs-ext==5.2.9
# via django-stubs
django-timezone-field==7.2.1 django-timezone-field==7.2.1
# via django-celery-beat # via django-celery-beat
djangorestframework==3.14.0 djangorestframework==3.14.0
@@ -139,10 +117,6 @@ djangorestframework==3.14.0
# mostovik-backend # mostovik-backend
djangorestframework-simplejwt==5.3.1 djangorestframework-simplejwt==5.3.1
# via mostovik-backend # via mostovik-backend
docutils==0.20.1
# via
# sphinx
# sphinx-rtd-theme
drf-yasg==1.21.10 drf-yasg==1.21.10
# via mostovik-backend # via mostovik-backend
et-xmlfile==2.0.0 et-xmlfile==2.0.0
@@ -154,44 +128,25 @@ faker==40.1.2
# factory-boy # factory-boy
# mostovik-backend # mostovik-backend
filelock==3.20.3 filelock==3.20.3
# via # via tldextract
# tldextract
# virtualenv
flake8==6.1.0
flower==2.0.1
gevent==23.9.1
gitdb==4.0.12
# via gitpython
gitpython==3.1.46
# via bandit
greenlet==3.3.0 greenlet==3.3.0
# via # via playwright
# gevent
# playwright
gunicorn==21.2.0
h11==0.16.0 h11==0.16.0
# via wsproto # via wsproto
humanize==4.15.0
# via flower
hyperlink==21.0.0 hyperlink==21.0.0
# via twisted # via twisted
identify==2.6.16
# via pre-commit
idna==3.11 idna==3.11
# via # via
# hyperlink # hyperlink
# requests # requests
# tldextract # tldextract
# trio # trio
imagesize==1.4.1
# via sphinx
incremental==24.11.0 incremental==24.11.0
# via twisted # via twisted
inflection==0.5.1 inflection==0.5.1
# via drf-yasg # via drf-yasg
iniconfig==2.3.0
# via pytest
isort==5.13.2 isort==5.13.2
# via pylint
itemadapter==0.13.1 itemadapter==0.13.1
# via # via
# itemloaders # itemloaders
@@ -201,9 +156,7 @@ itemloaders==1.3.2
itypes==1.2.0 itypes==1.2.0
# via coreapi # via coreapi
jinja2==3.1.6 jinja2==3.1.6
# via # via coreschema
# coreschema
# sphinx
jmespath==1.0.1 jmespath==1.0.1
# via # via
# itemloaders # itemloaders
@@ -214,25 +167,12 @@ lxml==6.0.2
# via # via
# parsel # parsel
# scrapy # scrapy
markdown-it-py==3.0.0
# via rich
markupsafe==3.0.3 markupsafe==3.0.3
# via # via jinja2
# jinja2
# werkzeug
mccabe==0.7.0 mccabe==0.7.0
# via flake8 # via pylint
mdurl==0.1.2
# via markdown-it-py
model-bakery==1.17.0 model-bakery==1.17.0
# via mostovik-backend # via mostovik-backend
mypy==1.8.0
mypy-extensions==1.1.0
# via
# black
# mypy
nodeenv==1.10.0
# via pre-commit
numpy==1.24.4 numpy==1.24.4
# via # via
# mostovik-backend # mostovik-backend
@@ -247,36 +187,23 @@ outcome==1.3.0.post0
# trio-websocket # trio-websocket
packaging==25.0 packaging==25.0
# via # via
# black
# drf-yasg # drf-yasg
# gunicorn
# incremental # incremental
# kombu # kombu
# parsel # parsel
# pytest
# scrapy # scrapy
# sphinx
pandas==2.0.3 pandas==2.0.3
# via mostovik-backend # via mostovik-backend
parsel==1.10.0 parsel==1.10.0
# via # via
# itemloaders # itemloaders
# scrapy # scrapy
pathspec==1.0.3
# via black
pillow==12.1.0 pillow==12.1.0
# via mostovik-backend # via mostovik-backend
platformdirs==4.5.1 platformdirs==4.5.1
# via # via pylint
# black
# virtualenv
playwright==1.57.0 playwright==1.57.0
# via mostovik-backend # via mostovik-backend
pluggy==1.6.0
# via pytest
pre-commit==3.6.0
prometheus-client==0.24.1
# via flower
prompt-toolkit==3.0.52 prompt-toolkit==3.0.52
# via click-repl # via click-repl
protego==0.5.0 protego==0.5.0
@@ -289,34 +216,22 @@ pyasn1==0.6.2
# service-identity # service-identity
pyasn1-modules==0.4.2 pyasn1-modules==0.4.2
# via service-identity # via service-identity
pycodestyle==2.11.1
# via flake8
pycparser==2.23 ; (implementation_name != 'PyPy' and implementation_name != 'pypy' and os_name == 'nt') or (implementation_name != 'PyPy' and platform_python_implementation != 'PyPy') pycparser==2.23 ; (implementation_name != 'PyPy' and implementation_name != 'pypy' and os_name == 'nt') or (implementation_name != 'PyPy' and platform_python_implementation != 'PyPy')
# via cffi # via cffi
pydispatcher==2.0.7 ; platform_python_implementation == 'CPython' pydispatcher==2.0.7 ; platform_python_implementation == 'CPython'
# via scrapy # via scrapy
pyee==13.0.0 pyee==13.0.0
# via playwright # via playwright
pyflakes==3.1.0
# via flake8
pygments==2.19.2
# via
# rich
# sphinx
pyjwt==2.10.1 pyjwt==2.10.1
# via djangorestframework-simplejwt # via djangorestframework-simplejwt
pylint==4.0.4
# via mostovik-backend
pyopenssl==25.1.0 pyopenssl==25.1.0
# via scrapy # via scrapy
pypydispatcher==2.1.2 ; platform_python_implementation == 'PyPy' pypydispatcher==2.1.2 ; platform_python_implementation == 'PyPy'
# via scrapy # via scrapy
pysocks==1.7.1 pysocks==1.7.1
# via urllib3 # via urllib3
pytest==7.4.4
# via
# pytest-cov
# pytest-django
pytest-cov==4.1.0
pytest-django==4.7.0
python-crontab==3.3.0 python-crontab==3.3.0
# via django-celery-beat # via django-celery-beat
python-dateutil==2.8.2 python-dateutil==2.8.2
@@ -335,14 +250,10 @@ pytz==2024.1
# django # django
# djangorestframework # djangorestframework
# drf-yasg # drf-yasg
# flower
# mostovik-backend # mostovik-backend
# pandas # pandas
pyyaml==6.0.3 pyyaml==6.0.3
# via # via drf-yasg
# bandit
# drf-yasg
# pre-commit
queuelib==1.8.0 queuelib==1.8.0
# via scrapy # via scrapy
redis==5.0.3 redis==5.0.3
@@ -354,13 +265,9 @@ requests==2.31.0
# coreapi # coreapi
# mostovik-backend # mostovik-backend
# requests-file # requests-file
# sphinx
# tldextract # tldextract
requests-file==3.0.1 requests-file==3.0.1
# via tldextract # via tldextract
rich==14.2.0
# via bandit
ruff==0.1.14
scrapy==2.11.2 scrapy==2.11.2
# via mostovik-backend # via mostovik-backend
selenium==4.17.2 selenium==4.17.2
@@ -373,47 +280,18 @@ simplejson==3.20.2
# via django-rest-swagger # via django-rest-swagger
six==1.17.0 six==1.17.0
# via python-dateutil # via python-dateutil
smmap==5.0.2
# via gitdb
sniffio==1.3.1 sniffio==1.3.1
# via trio # via trio
snowballstemmer==3.0.1
# via sphinx
sortedcontainers==2.4.0 sortedcontainers==2.4.0
# via trio # via trio
soupsieve==2.8.2 soupsieve==2.8.2
# via beautifulsoup4 # via beautifulsoup4
sphinx==7.2.6
# via
# sphinx-rtd-theme
# sphinxcontrib-jquery
sphinx-rtd-theme==2.0.0
sphinxcontrib-applehelp==2.0.0
# via sphinx
sphinxcontrib-devhelp==2.0.0
# via sphinx
sphinxcontrib-htmlhelp==2.1.0
# via sphinx
sphinxcontrib-jquery==4.1
# via sphinx-rtd-theme
sphinxcontrib-jsmath==1.0.1
# via sphinx
sphinxcontrib-qthelp==2.0.0
# via sphinx
sphinxcontrib-serializinghtml==2.0.0
# via sphinx
sqlparse==0.5.5 sqlparse==0.5.5
# via # via django
# django
# django-debug-toolbar
stevedore==5.6.0
# via bandit
tldextract==5.3.1 tldextract==5.3.1
# via scrapy # via scrapy
tomli==2.4.0 ; python_full_version <= '3.11' tomlkit==0.14.0
# via coverage # via pylint
tornado==6.5.4
# via flower
trio==0.32.0 trio==0.32.0
# via # via
# selenium # selenium
@@ -422,23 +300,13 @@ trio-websocket==0.12.2
# via selenium # via selenium
twisted==25.5.0 twisted==25.5.0
# via scrapy # via scrapy
typer==0.9.0
types-pytz==2025.2.0.20251108
# via django-stubs
types-pyyaml==6.0.12.20250915
# via django-stubs
types-requests==2.31.0.20240125
typing-extensions==4.15.0 typing-extensions==4.15.0
# via # via
# cron-descriptor # cron-descriptor
# django-stubs
# django-stubs-ext
# mypy
# pyee # pyee
# pyopenssl # pyopenssl
# selenium # selenium
# twisted # twisted
# typer
tzdata==2025.3 tzdata==2025.3
# via # via
# celery # celery
@@ -454,28 +322,22 @@ urllib3==2.6.3
# via # via
# requests # requests
# selenium # selenium
# types-requests
vine==5.1.0 vine==5.1.0
# via # via
# amqp # amqp
# celery # celery
# kombu # kombu
virtualenv==20.36.1
# via pre-commit
w3lib==2.3.1 w3lib==2.3.1
# via # via
# parsel # parsel
# scrapy # scrapy
watchdog==3.0.0
wcwidth==0.2.14 wcwidth==0.2.14
# via prompt-toolkit # via prompt-toolkit
werkzeug==3.0.1 whitenoise==6.11.0
# via mostovik-backend
wsproto==1.3.2 wsproto==1.3.2
# via trio-websocket # via trio-websocket
zope-event==6.1
# via gevent
zope-interface==8.2 zope-interface==8.2
# via # via
# gevent
# scrapy # scrapy
# twisted # twisted

View File

@@ -166,6 +166,7 @@ MIDDLEWARE = [
"apps.core.middleware.RequestIDMiddleware", "apps.core.middleware.RequestIDMiddleware",
"corsheaders.middleware.CorsMiddleware", "corsheaders.middleware.CorsMiddleware",
"django.middleware.security.SecurityMiddleware", "django.middleware.security.SecurityMiddleware",
"whitenoise.middleware.WhiteNoiseMiddleware",
"django.contrib.sessions.middleware.SessionMiddleware", "django.contrib.sessions.middleware.SessionMiddleware",
"django.middleware.common.CommonMiddleware", "django.middleware.common.CommonMiddleware",
"django.middleware.csrf.CsrfViewMiddleware", "django.middleware.csrf.CsrfViewMiddleware",