new models, frontend functions, public pages

This commit is contained in:
2025-05-07 15:41:03 +09:00
parent 91f0d54563
commit 18497d4343
784 changed files with 124024 additions and 289 deletions

View File

@@ -40,6 +40,8 @@ CORS_ALLOWED_ORIGINS = [
INSTALLED_APPS = [
"corsheaders",
'drf_spectacular',
"drf_spectacular_sidecar",
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
@@ -52,6 +54,7 @@ INSTALLED_APPS = [
'api',
'rest_framework',
'rest_framework_simplejwt',
'django_extensions',
]
MIDDLEWARE = [
@@ -91,6 +94,7 @@ REST_FRAMEWORK = {
'DEFAULT_PERMISSION_CLASSES': (
'rest_framework.permissions.IsAuthenticatedOrReadOnly',
),
'DEFAULT_SCHEMA_CLASS': 'drf_spectacular.openapi.AutoSchema',
}
from datetime import timedelta
@@ -151,8 +155,10 @@ USE_TZ = True
# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/5.2/howto/static-files/
STATIC_URL = 'static/'
STATIC_ROOT = BASE_DIR / 'staticfiles'
# URL, по которому статика будет доступна
STATIC_URL = '/static/'
# Default primary key field type
# https://docs.djangoproject.com/en/5.2/ref/settings/#default-auto-field

View File

@@ -3,6 +3,7 @@ from django.urls import path, include
from django.conf import settings
from django.conf.urls.static import static
urlpatterns = [
path('admin/', admin.site.urls),
path('api/', include('api.urls')), # API endpoints