Skip to content

Commit 28b0d28

Browse files
committed
Move 'add add-on' enhancement to 'Common management tasks'
appliying changes is done by ``make build-backend`
1 parent 4893dfa commit 28b0d28

File tree

1 file changed

+12
-96
lines changed

1 file changed

+12
-96
lines changed

docs/install/manage-add-ons-packages.md

Lines changed: 12 additions & 96 deletions
Original file line numberDiff line numberDiff line change
@@ -45,102 +45,6 @@ You can configure your instance's options, including the following.
4545
For a complete list of features, usage, and options, read [`cookiecutter-zope-instance`'s `README.rst`](https://github.com/plone/cookiecutter-zope-instance#readme).
4646
```
4747

48-
As an example of how to configure Zope, we will add the add-on `collective.easyform` to our Zope instance.
49-
50-
Zope is configured through the file {file}`instance.yaml` in your project.
51-
Modify the file as indicated.
52-
53-
```{code-block} yaml
54-
:emphasize-lines: 8
55-
56-
default_context:
57-
initial_user_name: 'admin'
58-
initial_user_password: 'admin'
59-
60-
load_zcml:
61-
package_includes: [
62-
'project_title',
63-
'collective.easyform',
64-
]
65-
66-
db_storage: direct
67-
```
68-
69-
Add-ons are listed here under the `package_includes` key to be loaded by `Zope`.
70-
As Python packages, they also need to be installed with `pip`.
71-
`pip` can install Python packages by specifying them in a requirements file.
72-
In your Plone project directory, open and edit the file {file}`backend/requirements.txt` as indicated.
73-
74-
```{code-block} text
75-
:emphasize-lines: 3
76-
77-
-r requirements/unreleased.txt
78-
src/project_title
79-
collective.easyform
80-
```
81-
82-
```{seealso}
83-
Documentation of Python [Requirements File Format](https://pip.pypa.io/en/stable/reference/requirements-file-format/).
84-
```
85-
86-
```{todo}
87-
There should be a new make target that does not require this dance of changing the working directory.
88-
```
89-
90-
Then after specifying requirements, you can install them by changing your working directory to `backend`, and using the following command.
91-
92-
```shell
93-
cd backend
94-
bin/pip install -r requirements.txt
95-
```
96-
97-
Next you can use `cookiecutter` to generate the Zope configuration files.
98-
99-
```shell
100-
bin/cookiecutter -f --no-input --config-file instance.yaml https://github.com/plone/cookiecutter-zope-instance
101-
```
102-
103-
Let's break down that command.
104-
105-
```{list-table} Table of Cookiecutter arguments
106-
:header-rows: 1
107-
108-
* - Option
109-
- Effect
110-
* - `-f`, `--overwrite-if-exists`
111-
- Overwrite the contents of the output directory if it already exists.
112-
Data in `var` stays untouched.
113-
* - `--no-input`
114-
- Do not prompt for parameters and only use `cookiecutter.json` file content.
115-
* - `--config-file instance.yaml`
116-
- User configuration file.
117-
```
118-
119-
As we mentioned earlier in {ref}`manage-installation-details-label`, `cookiecutter-zope-instance` creates a directory {file}`instance` that contains your Zope and Plone instance configuration.
120-
This directory also contains persistent storage objects. During {doc}`install-from-packages`, when we ran the command `make start-backend`, the `Makefile` target ran the following command.
121-
122-
```shell
123-
runwsgi -v instance/etc/zope.ini
124-
```
125-
126-
That command loaded that instance's configuration, and started the Zope instance and our Plone site.
127-
However, if your site is still running in the backend shell session, the changes will not show up until you restart the Plone backend.
128-
If needed, stop your Plone backend with {kbd}`ctrl-c`.
129-
Then start the backend with the following command.
130-
131-
```shell
132-
make start-backend
133-
```
134-
135-
In your web browser, and assuming you are currently logged in as `admin`, visit the URL http://localhost:8080/Plone/prefs_install_products_form.
136-
137-
Then click the {guilabel}`Install` button to complete installation of `collective.easyform`.
138-
139-
Return to the {guilabel}`Site Setup` control panel.
140-
At the bottom of the page, you should see the heading {guilabel}`Add-on Configuration`, and a panel {guilabel}`easyform` to configure the add-on that we just installed.
141-
142-
While visiting the home page, you can add a new `easyform` object.
143-
14448

14549
(manage-develop-packages-with-mxdev-label)=
14650

@@ -281,6 +185,18 @@ make build-backend
281185
```
282186

283187

188+
In your web browser, and assuming you are currently logged in as `admin`, visit the URL http://localhost:8080/Plone/prefs_install_products_form.
189+
190+
Then click the {guilabel}`Install` button to complete installation of `collective.easyform`.
191+
192+
Return to the {guilabel}`Site Setup` control panel.
193+
At the bottom of the page, you should see the heading {guilabel}`Add-on Configuration`, and a panel {guilabel}`easyform` to configure the add-on that we just installed.
194+
195+
While visiting the home page, you can add a new `easyform` object.
196+
197+
198+
199+
284200
(manage-backend-pin-the-version-of-an-add-on)=
285201

286202
### Pin the version of an add-on

0 commit comments

Comments
 (0)