switch to uv and add cors headers

This commit is contained in:
2025-07-25 01:23:29 +03:00
parent 0ea2ca744a
commit 7f47ac6849
30 changed files with 3326 additions and 2849 deletions

View File

@@ -24,6 +24,7 @@ INSTALLED_APPS = [
'crispy_bootstrap4',
'djconfig',
'jsoneditor',
'corsheaders',
'django.contrib.admin',
'django.contrib.auth',
@@ -34,7 +35,6 @@ INSTALLED_APPS = [
'cabinet.apps.CabinetConfig',
'feeds.apps.FeedsConfig',
'aggregator.apps.AggregatorConfig',
'bots.apps.BotsConfig',
]
@@ -43,6 +43,7 @@ MIDDLEWARE = [
'django.middleware.security.SecurityMiddleware',
'whitenoise.middleware.WhiteNoiseMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
"corsheaders.middleware.CorsMiddleware",
'django.middleware.common.CommonMiddleware',
# 'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
@@ -131,6 +132,8 @@ CRISPY_TEMPLATE_PACK = 'bootstrap4'
JSON_EDITOR_JS = 'https://cdnjs.cloudflare.com/ajax/libs/jsoneditor/7.0.4/jsoneditor.min.js'
JSON_EDITOR_CSS = 'https://cdnjs.cloudflare.com/ajax/libs/jsoneditor/7.0.4/jsoneditor.min.css'
CORS_ALLOW_ALL_ORIGINS = True
sentry_sdk.init(
dsn=env.str('SENTRY_DSN', None),
integrations=[DjangoIntegration()],