Skip to content

Commit f919508

Browse files
committed
Revise after testing
1 parent 7bb05f9 commit f919508

2 files changed

Lines changed: 97 additions & 6 deletions

File tree

docs/admin-guide/add-ons.md

Lines changed: 93 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ See {doc}`/volto/development/add-ons/index`.
2323
For instructions to install an add-on that is released on {term}`PyPI`, select the tab below according to your Python package manager.
2424

2525
```{tip}
26-
Select the tab for uv if you have a project that was created using Cookieplone.
26+
Select the tab for uv if you have a project that was created using Cookieplone, and you have `managed = true` set in the `[tool.uv]` section of the file {file}`backend/pyproject.toml`.
27+
Select the tab for pip if you have a project that was created using Cookieplone that does not have this setting.
2728
```
2829

2930
`````{tab-set}
@@ -65,6 +66,43 @@ make backend-build
6566
6667
````
6768
69+
````{tab-item} pip
70+
71+
Add the name of your add-on in the file {file}`backend/pyproject.toml` in the section `dependencies`.
72+
This example adds [`collective.easyform`](https://pypi.org/project/collective.easyform/).
73+
74+
```{code-block} toml
75+
:emphasize-lines: 6
76+
dependencies = [
77+
"Products.CMFPlone==6.1.1",
78+
"plone.api",
79+
"plone.classicui",
80+
"plone.app.caching",
81+
"collective.easyform==4.4.0",
82+
]
83+
```
84+
85+
```{tip}
86+
Including the add-on version, or "pinning a version", ensures that it won't unintentionally get upgraded in the future.
87+
```
88+
89+
Also add the add-on to `zcml_package_includes` in the file {file}`backend/instance.yaml` to make sure its configuration will be loaded.
90+
91+
```yaml
92+
default_context:
93+
zcml_package_includes: project_title, collective.easyform
94+
```
95+
96+
Stop the backend with {kbd}`ctrl-c`.
97+
98+
To actually download and install the new add-on, run the following command.
99+
100+
```shell
101+
make backend-build
102+
```
103+
104+
````
105+
68106
````{tab-item} Buildout
69107
70108
Update the file {file}`buildout.cfg`.
@@ -126,7 +164,8 @@ An unreleased add-on can be installed from a source control system such as GitHu
126164
For instructions to install an add-on that is released on {term}`PyPI`, select the tab below according to your Python package manager.
127165

128166
```{tip}
129-
Select the tab for uv if you have a project that was created using Cookieplone.
167+
Select the tab for uv if you have a project that was created using Cookieplone, and you have `managed = true` set in the `[tool.uv]` section of the file {file}`backend/pyproject.toml`.
168+
Select the tab for pip if you have a project that was created using Cookieplone that does not have this setting.
130169
```
131170

132171
`````{tab-set}
@@ -162,6 +201,58 @@ default_context:
162201
Stop the backend with {kbd}`ctrl-c`.
163202
````
164203
204+
````{tab-item} pip
205+
206+
Add the name of your add-on in the file {file}`backend/pyproject.toml` in the section `dependencies`.
207+
This example adds [`collective.easyform`](https://pypi.org/project/collective.easyform/).
208+
209+
```{code-block} toml
210+
:emphasize-lines: 6
211+
dependencies = [
212+
"Products.CMFPlone==6.1.1",
213+
"plone.api",
214+
"plone.classicui",
215+
"plone.app.caching",
216+
"collective.easyform",
217+
]
218+
```
219+
220+
```{note}
221+
When installing an add-on from source, it's best not to pin a version.
222+
This way you always get the version that's currently available in the source control system.
223+
```
224+
225+
Next add the add-on to `zcml_package_includes` in the file {file}`backend/instance.yaml` so that its configuration will load.
226+
227+
```yaml
228+
default_context:
229+
zcml_package_includes: project_title, collective.easyform
230+
```
231+
232+
Finally, add the package's source to the file {file}`mx.ini`.
233+
234+
```cfg
235+
[collective.easyform]
236+
url=git@github.com:collective/collective.easyform.git
237+
branch=dev-branch-name
238+
extras=test
239+
```
240+
241+
```{seealso}
242+
The {file}`mx.ini` file configures a tool called {term}`mxdev`.
243+
For an explanation of why Plone uses `mxdev`, see {ref}`manage-packages-mxdev-label`.
244+
```
245+
246+
Stop the backend with {kbd}`ctrl-c`.
247+
248+
To actually download and install the new add-on, run the following command.
249+
250+
```shell
251+
make backend-build
252+
```
253+
254+
````
255+
165256
````{tab-item} Buildout
166257
167258
Update the file {file}`buildout.cfg`.

docs/admin-guide/override-core.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ Sometimes you will need to override one or more package versions to fix a bug.
1919
For instructions of how to override a core Plone package, select the tab below according to your Python package manager.
2020

2121
```{tip}
22-
Select the tab for uv if you have a project that was created using Cookieplone after March 19, 2026.
23-
Select the tab for pip if you have a project that was created using Cookieplone earlier.
22+
Select the tab for uv if you have a project that was created using Cookieplone, and you have `managed = true` set in the `[tool.uv]` section of the file {file}`backend/pyproject.toml`.
23+
Select the tab for pip if you have a project that was created using Cookieplone that does not have this setting.
2424
```
2525

2626
`````{tab-set}
@@ -136,8 +136,8 @@ A core Plone package can be installed from a source control system such as GitHu
136136
For instructions, select the tab below according to your Python package manager.
137137

138138
```{tip}
139-
Select the tab for uv if you have a project that was created using Cookieplone after March 19, 2026.
140-
Select the tab for pip if you have a project that was created using Cookieplone earlier.
139+
Select the tab for uv if you have a project that was created using Cookieplone, and you have `managed = true` set in the `[tool.uv]` section of the file {file}`backend/pyproject.toml`.
140+
Select the tab for pip if you have a project that was created using Cookieplone that does not have this setting.
141141
```
142142

143143
`````{tab-set}

0 commit comments

Comments
 (0)