toml config
This commit is contained in:
@@ -4,6 +4,5 @@
|
|||||||
"project_short_description": "Python Boilerplate contains all the boilerplate you need to create a Python package.",
|
"project_short_description": "Python Boilerplate contains all the boilerplate you need to create a Python package.",
|
||||||
"email": "leolswq@163.com",
|
"email": "leolswq@163.com",
|
||||||
"github_username": "leo03wzz",
|
"github_username": "leo03wzz",
|
||||||
"secret_key": "super_secret",
|
|
||||||
"version": "0.1.0"
|
"version": "0.1.0"
|
||||||
}
|
}
|
||||||
|
|||||||
1
{{cookiecutter.project_slug}}/.gitignore
vendored
1
{{cookiecutter.project_slug}}/.gitignore
vendored
@@ -159,3 +159,4 @@ cython_debug/
|
|||||||
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
||||||
.idea/
|
.idea/
|
||||||
.vscode/
|
.vscode/
|
||||||
|
config.toml
|
||||||
|
|||||||
@@ -12,9 +12,9 @@ class Settings(BaseSettings):
|
|||||||
"""Application settings."""
|
"""Application settings."""
|
||||||
|
|
||||||
# 应用配置
|
# 应用配置
|
||||||
APP_NAME: str = "{{ cookiecutter.project_name }}"
|
APP_NAME: str
|
||||||
DEBUG: bool = False
|
DEBUG: bool
|
||||||
SECRET_KEY: str = "{{ cookiecutter.secret_key }}"
|
SECRET_KEY: str
|
||||||
|
|
||||||
# 路径配置
|
# 路径配置
|
||||||
BASE_DIR: Path = Path(__file__).parent.parent.parent
|
BASE_DIR: Path = Path(__file__).parent.parent.parent
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
# Application configuration
|
# Application configuration
|
||||||
app_name = "{{ cookiecutter.project_name }}"
|
APP_NAME = "{{ cookiecutter.project_name }}"
|
||||||
debug = false
|
DEBUG = false
|
||||||
|
SECRET_KEY = "your_secret_key"
|
||||||
|
|
||||||
# Add your custom configuration here
|
# Add your custom configuration here
|
||||||
@@ -3,5 +3,5 @@ import sys
|
|||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
# Add the src directory to the Python 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))
|
sys.path.insert(0, str(src_path))
|
||||||
|
|||||||
Reference in New Issue
Block a user