fixed pagination

This commit is contained in:
afanasyev.aa 2025-07-07 23:15:29 +09:00
parent 80ffab27e9
commit dd99c395a0
4 changed files with 51 additions and 15 deletions

View file

@ -105,6 +105,13 @@ WSGI_APPLICATION = 'testapi.wsgi.application'
# https://docs.djangoproject.com/en/5.1/ref/settings/#databases
if PRODUCTION:
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': BASE_DIR / 'db.sqlite3',
}
}
else:
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql',
@ -115,13 +122,7 @@ if PRODUCTION:
'PORT': os.getenv('DB_PORT'),
}
}
else:
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': BASE_DIR / 'db.sqlite3',
}
}
# Password validation
# https://docs.djangoproject.com/en/5.1/ref/settings/#auth-password-validators
@ -187,10 +188,10 @@ REST_FRAMEWORK = {
}
CSRF_COOKIE_SAMESITE = 'None' # temp
CSRF_COOKIE_SAMESITE = 'Lax' # temp
CSRF_COOKIE_SECURE = False
SESSION_COOKIE_SAMESITE = 'None' # temp
SESSION_COOKIE_SAMESITE = 'Lax' # temp
SESSION_COOKIE_SECURE = False
CSRF_TRUSTED_ORIGINS = os.getenv('CSRF_TRUSTED_ORIGINS', 'http://localhost:5173').split(',')
CSRF_TRUSTED_ORIGINS = os.getenv('CSRF_TRUSTED_ORIGINS', 'http://localhost:5173, http://localhost:8000').split(',')