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

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

View File

@@ -1,22 +1,19 @@
"""
URL configuration for wsgiapp project.
# DRF Rack
# Библиотека классов расширений для Django REST Framework
#
# Автор: Николай В. Анохин <n.anokhin@xeaf.net>
# Все права защищены. Лицензия: MIT
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/6.0/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Class-based views
1. Add an import: from other_app.views import Home
2. Add a URL to urlpatterns: path('', Home.as_view(), name='home')
Including another URLconf
1. Import the include() function: from django.urls import include, path
2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
"""
from django.contrib import admin
Модуль маршрутизации
"""
from django.urls import include
from django.urls import path
#
# Маршруты
#
urlpatterns = [
path('admin/', admin.site.urls),
path('v1/', include('net.xeaf.rack.urls')),
]