Добавлено представление получения информации о версии проекта

This commit is contained in:
2026-07-18 12:55:47 +03:00
parent cc57591e66
commit f0a6e4d97d
10 changed files with 186 additions and 60 deletions

View File

@@ -12,6 +12,8 @@ https://docs.djangoproject.com/en/6.0/ref/settings/
from pathlib import Path
import sys
# Build paths inside the project like this: BASE_DIR / 'subdir'.
BASE_DIR = Path(__file__).resolve().parent.parent
@@ -74,12 +76,21 @@ WSGI_APPLICATION = 'wsgiapp.wsgi.application'
# Database
# https://docs.djangoproject.com/en/6.0/ref/settings/#databases
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': ':memory:',
if 'test' in sys.argv:
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': ':memory:',
}
}
else:
# noinspection PyUnresolvedReferences
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': "/tmp/rack/rack.sqlite",
}
}
}
# Password validation