diff --git a/src/bot/templates/email/base.html b/src/api/endpoints/static.py similarity index 100% rename from src/bot/templates/email/base.html rename to src/api/endpoints/static.py diff --git a/src/api/router.py b/src/api/router.py index 173ffa97..3381c39b 100644 --- a/src/api/router.py +++ b/src/api/router.py @@ -1,4 +1,5 @@ from fastapi import APIRouter +from fastapi.staticfiles import StaticFiles from src.api.endpoints import ( category_router, @@ -15,3 +16,4 @@ api_router.include_router(form_router, prefix="/telegram", tags=["Forms"]) api_router.include_router(users_group_notification_router, prefix="/messages", tags=["Messages"]) api_router.include_router(site_user_router, prefix="/external_user_registration", tags=["ExternalSiteUser"]) +api_router.mount("/static", StaticFiles(directory=settings.STATIC_URL), name="static") \ No newline at end of file diff --git a/src/settings.py b/src/settings.py index 25534b4f..eaa75640 100644 --- a/src/settings.py +++ b/src/settings.py @@ -27,6 +27,7 @@ class Settings(BaseSettings): ROOT_PATH: str = "/api" DEBUG: bool = False USE_NGROK: bool = False + STATIC_URL: str = "../templates" # Параметры подключения к БД POSTGRES_DB: str diff --git a/src/bot/templates/registration/registration.html b/templates/email/base.html similarity index 100% rename from src/bot/templates/registration/registration.html rename to templates/email/base.html diff --git a/src/bot/templates/feedback_form/feedback_form.html b/templates/feedback_form/feedback_form.html similarity index 100% rename from src/bot/templates/feedback_form/feedback_form.html rename to templates/feedback_form/feedback_form.html diff --git a/src/bot/templates/feedback_form/pages/feedback_form.css b/templates/feedback_form/pages/feedback_form.css similarity index 100% rename from src/bot/templates/feedback_form/pages/feedback_form.css rename to templates/feedback_form/pages/feedback_form.css diff --git a/src/bot/templates/feedback_form/scripts/feedback_form.js b/templates/feedback_form/scripts/feedback_form.js similarity index 100% rename from src/bot/templates/feedback_form/scripts/feedback_form.js rename to templates/feedback_form/scripts/feedback_form.js diff --git a/templates/registration/registration.html b/templates/registration/registration.html new file mode 100644 index 00000000..e69de29b