toml config

This commit is contained in:
2025-01-20 15:39:23 +08:00
parent b9cde3e874
commit b8b7f5c768
5 changed files with 8 additions and 7 deletions

View File

@@ -4,6 +4,5 @@
"project_short_description": "Python Boilerplate contains all the boilerplate you need to create a Python package.",
"email": "leolswq@163.com",
"github_username": "leo03wzz",
"secret_key": "super_secret",
"version": "0.1.0"
}

View File

@@ -159,3 +159,4 @@ cython_debug/
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
.idea/
.vscode/
config.toml

View File

@@ -12,9 +12,9 @@ class Settings(BaseSettings):
"""Application settings."""
# 应用配置
APP_NAME: str = "{{ cookiecutter.project_name }}"
DEBUG: bool = False
SECRET_KEY: str = "{{ cookiecutter.secret_key }}"
APP_NAME: str
DEBUG: bool
SECRET_KEY: str
# 路径配置
BASE_DIR: Path = Path(__file__).parent.parent.parent

View File

@@ -1,5 +1,6 @@
# Application configuration
app_name = "{{ cookiecutter.project_name }}"
debug = false
APP_NAME = "{{ cookiecutter.project_name }}"
DEBUG = false
SECRET_KEY = "your_secret_key"
# Add your custom configuration here

View File

@@ -3,5 +3,5 @@ import sys
from pathlib import Path
# Add the src directory to the Python path
src_path = Path(__file__).parent.parent / "app"
src_path = Path(__file__).parent.parent
sys.path.insert(0, str(src_path))