Welcome, guest | Sign In | My Account | Store | Cart

Notice! PyPM is being replaced with the ActiveState Platform, which enhances PyPM’s build and deploy capabilities. Create your free Platform account to download ActivePython or customize Python with the packages you require and get automatic updates.

Download
ActivePython
INSTALL>
pypm install wildcard.readonly

How to install wildcard.readonly

  1. Download and install ActivePython
  2. Open Command Prompt
  3. Type pypm install wildcard.readonly
 Python 2.7Python 3.2Python 3.3
Windows (32-bit)
Windows (64-bit)
Mac OS X (10.5+)
Linux (32-bit)
1.0a2Never BuiltWhy not?
1.0a1 Failed View build log
Linux (64-bit)
1.0a2 Available View build log
1.0a1 Failed View build log
 
License
GPL
Dependencies
Lastest release
version 1.0a2 on Jan 9th, 2014

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 wildcard.recipe.insertinto recipe:

[readonly-insertinto]
recipe = wildcard.recipe.insertinto
client1 = ${client1:location}/etc/zope.conf insert-before "</zeoclient>" "\n\tread-only true\n"

Lastly, make sure to disable product installation in your client configuration, otherwise you'll get errors on startup:

[client1]
recipe = plone.recipe.zope2instance
...
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" />
...

Changelog

1.0a2 (2012-07-29)
  • fix packaging
1.0a1 (2012-06-14)
  • Initial release

Subscribe to package updates

Last updated Jan 9th, 2014

What does the lock icon mean?

Builds marked with a lock icon are only available via PyPM to users with a current ActivePython Business Edition subscription.

Need custom builds or support?

ActivePython Enterprise Edition guarantees priority access to technical support, indemnification, expert consulting and quality-assured language builds.

Plan on re-distributing ActivePython?

Get re-distribution rights and eliminate legal risks with ActivePython OEM Edition.