diff options
| author | Tolmachev Igor <me@igorek.dev> | 2026-03-23 18:07:30 +0300 |
|---|---|---|
| committer | Tolmachev Igor <me@igorek.dev> | 2026-03-23 18:07:30 +0300 |
| commit | f7b7e87cffc9dcb2817b070d7a003ac234c96ec3 (patch) | |
| tree | 47f8af52edcac24f16ae58d0501bd2a4a42c2278 /settings.py | |
| parent | 8e034766bb7e2d23f88c5ff1a254126f11a5f412 (diff) | |
| download | vpn_manager_bot-f7b7e87cffc9dcb2817b070d7a003ac234c96ec3.tar.gz vpn_manager_bot-f7b7e87cffc9dcb2817b070d7a003ac234c96ec3.zip | |
Add new_announcement command
Diffstat (limited to 'settings.py')
| -rw-r--r-- | settings.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/settings.py b/settings.py index 2daff90..04ba431 100644 --- a/settings.py +++ b/settings.py | |||
| @@ -8,12 +8,17 @@ class Env(BaseSettings): | |||
| 8 | proxy: str | None = None | 8 | proxy: str | None = None |
| 9 | 9 | ||
| 10 | 10 | ||
| 11 | database_path = Path("./storage/database.db").absolute() | 11 | storage_path = Path("./storage/").absolute() |
| 12 | database_path.parent.mkdir(parents=True, exist_ok=True) | 12 | storage_path.mkdir(parents=True, exist_ok=True) |
| 13 | |||
| 14 | database_path = storage_path / "database.db" | ||
| 13 | database_url = f"sqlite+aiosqlite:///{database_path}" | 15 | database_url = f"sqlite+aiosqlite:///{database_path}" |
| 14 | 16 | ||
| 17 | json_storage_path = storage_path / "storage.json" | ||
| 18 | |||
| 15 | __all__ = [ | 19 | __all__ = [ |
| 16 | "database_path", | 20 | "database_path", |
| 17 | "database_url", | 21 | "database_url", |
| 22 | "json_storage_path", | ||
| 18 | "Env", | 23 | "Env", |
| 19 | ] | 24 | ] |
