Django开发常用第三方库:cookiecutter-django 官网文档中英文对照(第一部分:项目生成选项)

Project Generation Options(项目生成选项)

This page describes all the template options that will be prompted by the cookiecutter CLI prior to generating your project.

 本页面描述了在使用cookiecutter CLI生成项目之前,cookiecutter CLI将提示的所有模板选项。

project_name(项目名称):
Your project’s human-readable name, capitals and spaces allowed.
您的项目的可读名称,允许使用大写字母和空格。

project_slug(项目slug):
Your project’s slug without dashes or spaces. Used to name your repo and in other places where a Python-importable version of your project name is needed.
您的项目的slug,不包含破折号或空格。用于命名您的存储库和其他需要Python可导入版本的项目名称的地方。

description(描述):
Describes your project and gets used in places like README.rst and such.
描述您的项目,用于README.rst等地方。

author_name(作者名称):
This is you! The value goes into places like LICENSE and such.
这是你!该值将出现在许可证等地方。

email(电子邮件):
The email address you want to identify yourself in the project.
您希望在项目中标识自己的电子邮件地址。

username_type(用户名类型):
The type of username you want to use in the project. This can be either username or email. If you choose username, the email field will be included. If you choose email, the username field will be excluded. It is best practice to always include an email field, so there is no option for having just the username field.
您想在项目中使用的用户名类型。可以是用户名或电子邮件。如果选择用户名,将包括电子邮件字段。如果选择电子邮件,将排除用户名字段。最佳做法是始终包括电子邮件字段,因此没有只有用户名字段的选项。

domain_name(域名):
The domain name you plan to use for your project once it goes live. Note that it can be safely changed later on whenever you need to.
您计划在项目上线后使用的域名。请注意,以后可以安全地更改它。

version(版本):
The version of the project at its inception.
项目在初始阶段的版本。

open_source_license(开源许可证):
A software license for the project. The choices are:
项目的软件许可证。选择包括:
- MIT
- BSD
- GPLv3
- Apache Software License 2.0
- Not open source(非开源)

timezone(时区):
The value to be used for the TIME_ZONE setting of the project.
项目的TIME_ZONE设置的值。

windows(Windows配置):
Indicates whether the project should be configured for development on Windows.
指示是否应将项目配置为在Windows上开发。

editor(编辑器):
Select an editor to use. The choices are:
选择要使用的编辑器。选择包括:
- None
- PyCharm
- VS Code

use_docker(使用Docker):
Indicates whether the project should be configured to use Docker, Docker Compose and devcontainer.
指示是否应将项目配置为使用Docker、Docker Compose和devcontainer。

postgresql_version(PostgreSQL版本):
Select a PostgreSQL version to use. The choices are:
选择要使用的PostgreSQL版本。选择包括:
- 15
- 14
- 13
- 12
- 11
- 10

cloud_provider(云提供商):
Select a cloud provider for static & media files. The choices are:
选择用于静态和媒体文件的云提供商。选择包括:
- AWS
- GCP
- Azure
- None

mail_service(邮件服务):
Select an email service that Django-Anymail provides
选择Django-Anymail提供的电子邮件服务。
- Mailgun
- Amazon SES
- Mailjet
- Mandrill
- Postmark
- SendGrid
- SendinBlue
- SparkPost
- Other SMTP

use_async(使用异步):
Indicates whether the project should use web sockets with Uvicorn + Gunicorn.
指示项目是否应使用Uvicorn + Gunicorn进行Web套接字。

use_drf(使用Django Rest Framework):
Indicates whether the project should be configured to use Django Rest Framework.
指示项目是否应配置为使用Django Rest Framework。

frontend_pipeline(前端流水线):
Select a pipeline to compile and optimise frontend assets (JS, CSS, …):
选择一个管道来编译和优化前端资产(JS、CSS等):
- None
- Django Compressor
- Gulp
- Webpack
- Both Gulp and Webpack support Bootstrap recompilation with real-time variables alteration.

use_celery(使用Celery):
Indicates whether the project should be configured to use Celery.
指示项目是否应配置为使用Celery。

use_mailpit(使用Mailpit):
Indicates whether the project should be configured to use Mailpit.
指示项目是否应配置为使用Mailpit。

use_sentry(使用Sentry):
Indicates whether the project should be configured to use Sentry.
指示项目是否应配置为使用Sentry。

use_whitenoise(使用WhiteNoise):
Indicates whether the project should be configured to use WhiteNoise.
指示项目是否应配置为使用WhiteNoise。

use_heroku(使用Heroku):
Indicates whether the project should be configured so as to be deployable to Heroku.
指示项目是否应配置为可以部署到Heroku。

ci_tool(CI工具):
Select a CI tool for running tests. The choices are:
选择一个用于运行测试的CI工具。选择包括:
- None
- Travis CI
- Gitlab CI
- Github Actions
- Drone CI

keep_local_envs_in_vcs(保留本地环境变量):
Indicates whether the project’s .envs/.local/ should be kept in VCS (comes in handy when working in teams where local environment reproducibility is strongly encouraged). Note: .env(s) are only utilized when Docker Compose and/or Heroku support is enabled.
指示是否应将项目的.envs/.local/保留在VCS中(在强烈鼓励本地环境可重现性的团队中很方便)。注意:仅在启用Docker Compose和/或Heroku支持时才使用.env(s)。

debug(调试配置):
Indicates whether the project should be configured for debugging. This option is relevant for Cookiecutter Django developers only.
指示是否应为调试配置项目。此选项仅适用于Cookiecutter Django开发人员。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值