diff --git a/setup.cfg b/setup.cfg index 98a9a500..e6a32af3 100644 --- a/setup.cfg +++ b/setup.cfg @@ -3,7 +3,7 @@ name = zero-true description = A collaborative notebook built for data scientists long_description = file: README.md long_description_content_type = text/markdown -version = 0.0.dev14 +version = 0.0.dev15 [options] include_package_data = true diff --git a/zt_backend/config.py b/zt_backend/config.py index 09f1079c..529588c2 100644 --- a/zt_backend/config.py +++ b/zt_backend/config.py @@ -3,6 +3,8 @@ class Settings(BaseSettings): run_mode: str = "app" + project_name: str = "" + user_name: str = "" @lru_cache() def get_settings(): diff --git a/zt_backend/main.py b/zt_backend/main.py index 8160b9ea..1175d7d1 100644 --- a/zt_backend/main.py +++ b/zt_backend/main.py @@ -5,7 +5,6 @@ from zt_backend.models.notebook import Notebook, CodeCell from zt_backend.config import settings import zt_backend.router as router -import toml import os import uuid @@ -15,11 +14,12 @@ run_mode = settings.run_mode -project_name = '' +project_name = settings.project_name +user_name = settings.user_name route_prefix = '' if project_name: - route_prefix = '/'+project_name+'/'+run_mode + route_prefix = '/'+project_name+'/'+user_name app.include_router(router.router, prefix=route_prefix)