Plone 6 Backend Add-on (Python)#
The backend_addon template creates a Python add-on package for the Plone 6 backend.
uvx cookieplone backend_addon
Template ID |
|
Group |
Add-ons |
Folder in |
|
Folder generated with the default answers |
|
Requirements#
Before its first question, the template checks for:
Cookieplone 2.0.0a2 or later.
uv.
git.
Questions#
Cookieplone asks these questions in this order.
A default in {{ }} is computed from earlier answers.
Field |
Question |
Default |
Choices |
Validation |
|---|---|---|---|---|
|
Addon Title |
|
— |
— |
|
Description |
|
— |
— |
|
Author |
|
— |
— |
|
Author E-mail |
|
— |
|
|
GitHub Username or Organization |
|
— |
— |
|
Should we use prerelease versions? |
|
|
— |
|
Plone Version |
|
— |
|
|
Python Package Name |
|
— |
|
|
Support the Volto frontend? |
|
— |
— |
|
Add CI configuration? |
|
— |
— |
|
Add documentation scaffold? |
|
— |
— |
What your answers change#
The post-generation hook:
removes the
browserpackage whenfeature_headlessis yes, or theserializerspackage when it's no;creates the namespace packages of
python_package_nameinsrc;formats the code;
initializes a git repository.
Then the template runs these sub-templates:
Sub-template |
Generates |
When |
|---|---|---|
|
|
|
|
|
|
|
|
|
When project, aurora_cmfplone, or monorepo_addon run backend_addon as a sub-template, the hook skips the namespace packages, which the parent template creates, and the parent template removes the .git folder from backend.
Generated files#
With the default answers, the template generates these files, three levels deep:
collective.addon/
├── .cookieplone.json
├── .editorconfig
├── .flake8
├── .github/
│ ├── dependabot.yml
│ ├── instructions/
│ │ ├── docs.instructions.md
│ │ └── general/
│ └── workflows/
│ ├── changelog.yml
│ ├── config.yml
│ └── main.yml
├── .gitignore
├── .vscode/
│ ├── extensions.json
│ ├── launch.json
│ └── settings.json
├── bobtemplate.cfg
├── CHANGELOG.md
├── CONTRIBUTORS.md
├── docs/
│ ├── .gitignore
│ ├── .readthedocs.yaml
│ ├── .vale.ini
│ ├── docs/
│ │ ├── _static/
│ │ ├── _templates/
│ │ ├── concepts/
│ │ ├── conf.py
│ │ ├── glossary.md
│ │ ├── how-to-guides/
│ │ ├── index.md
│ │ ├── reference/
│ │ ├── robots.txt
│ │ └── tutorials/
│ ├── LICENSE.md
│ ├── Makefile
│ ├── pyproject.toml
│ ├── README.md
│ └── styles/
│ └── config/
├── instance.yaml
├── LICENSE.GPL
├── LICENSE.md
├── Makefile
├── mx.ini
├── news/
│ ├── .changelog_template.jinja
│ └── .gitkeep
├── pyproject.toml
├── README.md
├── scripts/
│ └── create_site.py
├── src/
│ └── collective/
│ └── addon/
└── tests/
├── conftest.py
└── setup/
├── test_setup_install.py
└── test_setup_uninstall.py
Next steps#
The generated README.md lists uv, Make, and git as prerequisites, and Docker as optional.
From the add-on folder, install the add-on and create a Plone site:
make install
make create-site
Start Plone at http://localhost:8080:
make start
make help lists the other targets, such as make test.