Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions docs/backend/vocabularies.md
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ def available_documents_source(context):
"""Return a vocabulary of documents in the current folder."""
# Get the portal catalog
catalog = context.portal_catalog

# Query for documents
brains = catalog.searchResults(
portal_type='Document',
Expand All @@ -221,7 +221,7 @@ def available_documents_source(context):
'depth': 1,
},
)

# Build vocabulary terms
terms = [
SimpleTerm(
Expand All @@ -231,7 +231,7 @@ def available_documents_source(context):
)
for brain in brains
]

return SimpleVocabulary(terms)
```

Expand Down Expand Up @@ -577,18 +577,18 @@ from zope.schema.vocabulary import SimpleVocabulary
def authors_vocabulary_factory(context):
"""Vocabulary of authors from existing content."""
catalog = api.portal.get_tool('portal_catalog')

# Get unique creators from all content
brains = catalog.searchResults(
portal_type=['Document', 'News Item', 'Event'],
)

# Collect unique authors
authors = set()
for brain in brains:
if brain.Creator:
authors.add(brain.Creator)

# Build terms sorted alphabetically
terms = []
for author_id in sorted(authors):
Expand All @@ -598,15 +598,15 @@ def authors_vocabulary_factory(context):
fullname = user.getProperty('fullname') or author_id
else:
fullname = author_id

terms.append(
SimpleTerm(
value=author_id,
token=author_id,
title=fullname,
)
)

return SimpleVocabulary(terms)
```

Expand Down Expand Up @@ -665,9 +665,9 @@ The response includes the `token` and `title` for each term:

## See Also

- {ref}`fields-label` for field types that use vocabularies
- {doc}`../forms/index` for form handling
- [zope.schema documentation](https://zopeschema.readthedocs.io/)
- {ref}`backend-fields-label` for field types that use vocabularies
- {doc}`/classic-ui/forms` for form handling
- [zope.schema documentation](https://zopeschema.readthedocs.io/en/latest/)
- [plone.app.vocabularies source code](https://github.com/plone/plone.app.vocabularies)
- [bobtemplates.plone documentation](https://bobtemplatesplone.readthedocs.io/)

Expand Down
2 changes: 1 addition & 1 deletion docs/classic-ui/views.md
Original file line number Diff line number Diff line change
Expand Up @@ -717,7 +717,7 @@ However, in most cases:
You get the HTML output with `self.index()`.
The page template gets a context argument `view`, pointing to the view class instance.
The `index` value is usually an instance of [`Products.Five.browser.pagetemplate.ViewPageTemplateFile`](https://github.com/zopefoundation/Zope/blob/d1814d0a6bddb615629b552de10e9aa5ad30a6da/src/Products/Five/browser/pagetemplatefile.py#L35) for full Plone pages or [`zope.pagetemplate.pagetemplatefile.PageTemplateFile`](https://github.com/zopefoundation/zope.pagetemplate/blob/14ba59c98e12517b9f8abcdb24bc882bb435ed7c/src/zope/pagetemplate/pagetemplatefile.py#L43) for HTML snippets without using acquisition.
- View classes should implement the {doc}`interface </backend/interfaces>`
- View classes should implement the {term}`interface`
[`zope.browser.interfaces.IBrowserView`](https://github.com/zopefoundation/zope.browser/blob/1239c75e4e190df992bf34a88b4ead2c952afe86/src/zope/browser/interfaces.py#L27).

Views that render page snippets and parts can be direct subclasses of `zope.publisher.browser.BrowserView`, as snippets might not need acquisition support which adds some overhead to the rendering process.
Expand Down
39 changes: 20 additions & 19 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,50 +77,51 @@
smartquotes = False

# Options for the linkcheck builder
linkcheck_anchors = True
# Ignore localhost
linkcheck_allowed_redirects = {
# All HTTP redirections from the source URI to the canonical URI will be treated as "working".
# Example
# r"https://chrome\.google\.com/webstore/detail/.*": r"https://consent\.google\.com/.*",
# Weblate now temporarily redirects to stop bots and AI
r"https://hosted\.weblate\.org/.*": r"https://hosted\.weblate\.org/\.within\.website/\?redir=/.*",
}
linkcheck_ignore = [
# Ignore local and example URLs
r"http://127.0.0.1",
r"http://localhost",
r"http://yoursite",
# Ignore static file downloads
r"^/_static/",
r"^/_images/",
r"^/_static/",
# Ignore pages that require authentication
r"https://classic.demo.plone.org/en/demo/an-image.jpg/@@images-test#srcset",
r"https://github.com/orgs/plone/teams/",
r"https://github.com/plone/documentation/issues/new",
r"https://classic.demo.plone.org/en/demo/an-image.jpg/@@images-test#srcset",
r"https://javascript.plainenglish.io/you-dont-need-lodash-how-i-gave-up-lodash-693c8b96a07c",
# Ignore pages that are rate limited or otherwise blocked
r"https://codesandbox.io/",
r"https://codesandbox.io/", #volto
r"https://docutils.sourceforge.io/",
r"https://flaviocopes.com", # volto
r"https://hosted.weblate.org/",
r"https://medium.com",
r"https://pastanaga.io",
r"https://stackoverflow.com",
r"https://v5.reactrouter.com",
r"https://stackoverflow.com", #volto
r"https://v5.reactrouter.com", #volto
r"https://web.archive.org/",
r"https://www.merriam-webster.com/",
r"https://www.npmjs.com/",
# Ignore github.com pages with anchors
r"https://github.com/.*#.*",
r"https://www.npmjs.com", #volto
# Bad TLS certificate
r"https://pastanaga.io", # See https://github.com/plone/volto/issues/8399
# Ignore redirects and rate limiting by github.com
r"https://github.com/plone/volto/issues",
r"https://github.com/plone/volto/pull",
# Ignore github.com pages with anchors
r"https://github.com/.*#.*",
# Ignore other specific anchors
r"https://browsersl.ist/#", # volto
# fluke where Sphinx MyST linkify extension interprets this as a URL
r"http://z3c.pt",
]
linkcheck_allowed_redirects = {
# All HTTP redirections from the source URI to the canonical URI will be treated as "working".
# Example
# r"https://chrome\.google\.com/webstore/detail/.*": r"https://consent\.google\.com/.*",
# Weblate now temporarily redirects to stop bots and AI
r"https://hosted\.weblate\.org/.*": r"https://hosted\.weblate\.org/\.within\.website/\?redir=/.*",
}
linkcheck_retries = 1
linkcheck_report_timeouts_as_broken = True
linkcheck_retries = 1
linkcheck_timeout = 5

# The suffix of source filenames.
Expand Down
52 changes: 51 additions & 1 deletion docs/install/containers/images/historical.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Each release lists only its last version.

| Plone release | Last version | Python | Tags | Platforms |
| --- | --- | --- | --- | --- |
| 5.2 | 5.2.4 | 3.8.8 | `plone/plone:5.2`, `plone/plone:5.2.4` | linux/amd64 |
| 5.2 | 5.2.14 | 3.8.20 | `plone/plone:5.2`, `plone/plone:5.2.14` | linux/amd64 |
| 5.1 | 5.1.6 | 2.7.17 | `plone/plone:5.1`, `plone/plone:5.1.6` | linux/amd64 |
| 5.0 | 5.0.8 | 2.7.14 | `plone/plone:5.0`, `plone/plone:5.0.8` | linux/amd64 |
| 4.3 | 4.3.19 | 2.7.17 | `plone/plone:4.3`, `plone/plone:4.3.19` | linux/amd64 |
Expand All @@ -58,6 +58,12 @@ Each release lists only its last version.
All images listen on port 8080, and store their data in a {file}`/data` volume.
To use an existing database, place its {file}`Data.fs` file at {file}`/data/filestorage/Data.fs` before the first start.

The tags `plone/plone:latest` and `plone/plone:5` point to the Plone 5.2 image.

Each release also has a demo variant, tagged with a `-demo` suffix, that ships with a Plone site already created.
The demo variants of Plone 4.3 to 5.2 always use the user `admin` with the password `admin`, and don't read the `ADMIN_USER` and `ADMIN_PASSWORD` environment variables.
On their first start, they copy their database into {file}`/data`, unless {file}`/data` already holds a database.


## Plone 5.2

Expand All @@ -68,6 +74,17 @@ docker run -p 8080:8080 -v plone52-data:/data plone/plone:5.2
Then point your browser at `http://localhost:8080`, and add a Plone site with the user `admin` and the password `admin`.


### Plone 5.2 demo variant

The `plone/plone:5.2-demo` image ships with a Plone site already created with the ID `Plone`.

```shell
docker run -p 8080:8080 plone/plone:5.2-demo
```

Then point your browser at `http://localhost:8080/Plone`, and log in with the user `admin` and the password `admin`.


## Plone 5.1

```shell
Expand All @@ -77,6 +94,17 @@ docker run -p 8080:8080 -v plone51-data:/data plone/plone:5.1
Then point your browser at `http://localhost:8080`, and add a Plone site with the user `admin` and the password `admin`.


### Plone 5.1 demo variant

The `plone/plone:5.1-demo` image ships with a Plone site already created with the ID `Plone`.

```shell
docker run -p 8080:8080 plone/plone:5.1-demo
```

Then point your browser at `http://localhost:8080/Plone`, and log in with the user `admin` and the password `admin`.


## Plone 5.0

```shell
Expand All @@ -86,6 +114,17 @@ docker run -p 8080:8080 -v plone50-data:/data plone/plone:5.0
Then point your browser at `http://localhost:8080`, and add a Plone site with the user `admin` and the password `admin`.


### Plone 5.0 demo variant

The `plone/plone:5.0-demo` image ships with a Plone site already created with the ID `Plone`.

```shell
docker run -p 8080:8080 plone/plone:5.0-demo
```

Then point your browser at `http://localhost:8080/Plone`, and log in with the user `admin` and the password `admin`.


## Plone 4.3

```shell
Expand All @@ -95,6 +134,17 @@ docker run -p 8080:8080 -v plone43-data:/data plone/plone:4.3
Then point your browser at `http://localhost:8080`, and add a Plone site with the user `admin` and the password `admin`.


### Plone 4.3 demo variant

The `plone/plone:4.3-demo` image ships with a Plone site already created with the ID `Plone`.

```shell
docker run -p 8080:8080 plone/plone:4.3-demo
```

Then point your browser at `http://localhost:8080/Plone`, and log in with the user `admin` and the password `admin`.


## Plone 4.2

```shell
Expand Down
Loading