fix_config
This commit is contained in:
19
src/apps/user/migrations/0004_alter_user_groups.py
Normal file
19
src/apps/user/migrations/0004_alter_user_groups.py
Normal file
@@ -0,0 +1,19 @@
|
||||
# Generated by Django 3.2.25 on 2026-02-11 06:57
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('auth', '0012_alter_user_first_name_max_length'),
|
||||
('user', '0003_alter_user_groups'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='user',
|
||||
name='groups',
|
||||
field=models.ManyToManyField(blank=True, help_text='', related_name='custom_user_set', related_query_name='custom_user', to='auth.Group', verbose_name='groups'),
|
||||
),
|
||||
]
|
||||
49
src/config/settings/development.py
Normal file
49
src/config/settings/development.py
Normal file
@@ -0,0 +1,49 @@
|
||||
"""
|
||||
Local development settings - использует локальные сервисы.
|
||||
"""
|
||||
import os
|
||||
from .base import *
|
||||
|
||||
SECRET_KEY = "django-insecure-local-development-key-mostovik-2024"
|
||||
DEBUG = True
|
||||
ALLOWED_HOSTS = ["localhost", "127.0.0.1", "0.0.0.0"]
|
||||
|
||||
# JWT
|
||||
SIMPLE_JWT["SIGNING_KEY"] = SECRET_KEY
|
||||
|
||||
# Database - используем локальный PostgreSQL
|
||||
DATABASES = {
|
||||
"default": {
|
||||
"ENGINE": "django.db.backends.postgresql",
|
||||
"NAME": os.environ.get("POSTGRES_DB", "mostovik_dev"),
|
||||
"USER": os.environ.get("POSTGRES_USER", "postgres"),
|
||||
"PASSWORD": os.environ.get("POSTGRES_PASSWORD", "postgres"),
|
||||
"HOST": os.environ.get("POSTGRES_HOST", "localhost"),
|
||||
"PORT": os.environ.get("POSTGRES_PORT", "5432"),
|
||||
}
|
||||
}
|
||||
|
||||
# Celery - используем локальный Redis
|
||||
CELERY_BROKER_URL = os.environ.get("REDIS_URL", "redis://localhost:6379/0")
|
||||
CELERY_RESULT_BACKEND = os.environ.get("REDIS_URL", "redis://localhost:6379/0")
|
||||
CELERY_ACCEPT_CONTENT = ["json"]
|
||||
CELERY_TASK_SERIALIZER = "json"
|
||||
CELERY_RESULT_SERIALIZER = "json"
|
||||
CELERY_TIMEZONE = "Europe/Moscow"
|
||||
|
||||
# Cache - используем локальный Redis
|
||||
CACHES = {
|
||||
"default": {
|
||||
"BACKEND": "django_redis.cache.RedisCache",
|
||||
"LOCATION": os.environ.get("REDIS_URL", "redis://localhost:6379/1"),
|
||||
"OPTIONS": {
|
||||
"CLIENT_CLASS": "django_redis.client.DefaultClient",
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
# Email
|
||||
EMAIL_BACKEND = "django.core.mail.backends.console.EmailBackend"
|
||||
|
||||
# Static files
|
||||
STATICFILES_STORAGE = "whitenoise.storage.CompressedManifestStaticFilesStorage"
|
||||
Reference in New Issue
Block a user