-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcopier.yml
More file actions
134 lines (112 loc) · 3.36 KB
/
Copy pathcopier.yml
File metadata and controls
134 lines (112 loc) · 3.36 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
_answers_file: .copier-answers.yml
_templates_suffix: .jinja
_exclude:
- ".git"
- ".idea"
- ".venv"
- ".pytest_cache"
- ".mypy_cache"
- ".ruff_cache"
- "__pycache__"
- "*.pyc"
- "build"
- "dist"
- "uv.lock"
- "copier.yml"
project_title:
type: str
help: 生成项目对外展示名称(OpenAPI title / Admin title 等)
default: "DjangoStarter API"
project_description:
type: str
help: 生成项目对外展示描述(OpenAPI description 等)
default: ""
package_name:
type: str
help: 生成项目的包名/仓库名(建议小写 + 中划线)
default: "{{ project_title|lower|replace(' ', '-')|replace('_', '-') }}"
package_description:
type: str
help: 生成项目的发行包描述(pyproject.toml -> [project].description)
default: "Headless Django + Django-Ninja starter for pure API development"
author_name:
type: str
help: 生成项目作者名(pyproject.toml -> [project].authors)
default: "DealiAxy"
author_email:
type: str
help: 生成项目作者邮箱(pyproject.toml -> [project].authors)
default: "dealiaxy@gmail.com"
python_requires:
type: str
help: 生成项目 Python 版本约束(pyproject.toml -> [project].requires-python)
default: "==3.14.*"
api_prefix:
type: str
help: API 路由前缀(对应 /api/<prefix>/...;用于 DjangoStarter Core 路由挂载)
default: "django-starter"
enable_account_api:
type: bool
help: 是否启用 account API 路由(/api/account/...)
default: true
enable_billing_api:
type: bool
help: 是否启用 billing API 路由(/api/billing/...)
default: true
enable_demo_api:
type: bool
help: 是否启用 demo API 路由(/api/demo/...)
default: true
enable_integrations_api:
type: bool
help: 是否启用 integrations API 路由(/api/integrations/...)
default: true
enable_ninja_docs:
type: bool
help: 是否默认开启 Swagger UI(可用 DJANGO_NINJA_DOCS_ENABLED 覆盖)
default: true
enable_prometheus:
type: bool
help: 是否默认启用 Prometheus 中间件(可用 PROMETHEUS_ENABLED 覆盖)
default: false
database:
type: str
help: 默认数据库类型(可用 DJANGO_DB_* 环境变量覆盖)
choices:
SQLite: sqlite
PostgreSQL: postgres
default: sqlite
postgres_host:
type: str
help: PostgreSQL 主机(仅当 database=postgres 时生效)
default: "127.0.0.1"
when: "{{ database == 'postgres' }}"
postgres_port:
type: int
help: PostgreSQL 端口(仅当 database=postgres 时生效)
default: 5432
when: "{{ database == 'postgres' }}"
postgres_db:
type: str
help: PostgreSQL 数据库名(仅当 database=postgres 时生效)
default: "{{ package_name|replace('-', '_') }}"
when: "{{ database == 'postgres' }}"
postgres_user:
type: str
help: PostgreSQL 用户名(仅当 database=postgres 时生效)
default: "postgres"
when: "{{ database == 'postgres' }}"
postgres_password:
type: str
help: PostgreSQL 密码(仅当 database=postgres 时生效)
default: ""
when: "{{ database == 'postgres' }}"
use_local_core:
type: bool
help: 是否启用 uv 的本地路径 editable 覆盖(便于在同一工作区联调 django-starter-core)
default: false
core_local_path:
type: str
help: django-starter-core 的本地路径(仅在启用本地联调时生效)
default: "../django-starter-core"
when: "{{ use_local_core }}"