new models, frontend functions, public pages
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user