Skip to main content

Introduction

This package provides a mechanism to easily have clients set to work with readonly.

This is mostly useful for preventing ReadOnlyError from cropping up from write on read operations for a public read only site.

Warning

Also make sure to set your zeo client zope.conf read-only true setting:

<zodb_db main>
    <zeoclient>
    ...
    read-only true
    ...
    </zeoclient>
</zodb_db>

To make this work along with buildout, use the read-only recipe config option. Also, make sure to disable product installation in your client configuration, otherwise you’ll get errors on startup. Make sure to use plone.app.zeoclient >= 4.2.12 as it includes the read-only config option:

[client1]
recipe = plone.recipe.zope2instance
...
read-only = true
enable-product-installation = off
...

Usage

Abort all transactions

Aborts transaction on IPubBeforeCommit event.

Add this to the zcml-additional option for your client:

[client1]
recipe = plone.recipe.zope2instance
...
zcml-additional =
    <include package="wildcard.readonly" file="readonly.zcml" />
...

Doom all transactions

Dooms the transaction on the IPubAfterTraversal event.

Add this to the zcml-additional option for your client:

[client1]
recipe = plone.recipe.zope2instance
...
zcml-additional =
    <include package="wildcard.readonly" file="readonly-doom.zcml" />
...

Conditionally abort transactions

Useful when aborting all transactions prevents emails from getting sent out. For instance, if you’re using PloneFormGen in your setup, dooming and aborting will prevent mail from getting sent.

Add this to the zcml-additional option for your client:

[client1]
recipe = plone.recipe.zope2instance
...
zcml-additional =
    <include package="wildcard.readonly" file="readonly-conditional.zcml" />
...

Handling sending mail

Since mail is tied to transaction management, aborting all transactions will also prevent sending mail on the site.

Add this to the zcml-additional option for your client:

[client1]
recipe = plone.recipe.zope2instance
...
zcml-additional =
    <include package="wildcard.readonly" file="mail.zcml" />
...

Changelog

1.0 (2014-02-26)

  • be able to patch mail host to still send out emails

1.0a2 (2012-07-29)

  • fix packaging

1.0a1 (2012-06-14)

  • Initial release

Metadata

Release files for wildcard.readonly 1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for wildcard.readonly 1.0
File Size Uploaded Provenance Actions
wildcard.readonly-1.0.zip 20.0 kB Without provenance Details for wildcard.readonly-1.0.zip

Release files / wildcard.readonly-1.0.zip

Download URL wildcard.readonly-1.0.zip
Size 20.0 kB
Tags Source
SHA-256 checksum
How to use checksums
af5e4191343fe569e85d9160ea9bf7166547b4cf3f375156757b8c83d27cb472
BLAKE2b-256 checksum
How to use checksums
0a3c9a9395dfd57626d374251f0db99340fcf7d65995b81802c8bb3bb5859924
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for wildcard.readonly 1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page