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 ftw.quota

How to install ftw.quota

  1. Download and install ActivePython
  2. Open Command Prompt
  3. Type pypm install ftw.quota
 Python 2.7Python 3.2Python 3.3
Windows (32-bit)
Windows (64-bit)
Mac OS X (10.5+)
Linux (32-bit)
Linux (64-bit)
1.0 Available View build log
 
License
GPL2
Lastest release
version 1.0 on Jan 9th, 2014

ftw.quota

This product adds quota support to archetypes containers.

Install
  • Add the package to the eggs in your buildout configuration:
[instance]
eggs +=
    ftw.quota
  • Install the generic setup profile of the package.
Usage

Add the marker interface ftw.quota.interfaces.IQuotaSupport to any archetypes container that you want to have quota support.

Containers with quota support will get additional fields for quota setup. You can setup quota limits in the edit form.

To make all archetypes objects quota aware e.g. you can use the following zcml directive:

>>> <class class="Products.Archetypes.BaseObject.BaseObject">
...     <implements interface="ftw.quota.interfaces.IQuotaAware" />
... </class>

The quota configuration is stored using additional fields (schema extender) and can be accessed easily:

>>> container.Schema().getField('quota').get(container)
... ...  # quota in bytes
>>> container.Schema().getField('usage').get(container)
... ...  # usage in bytes
>>> container.Schema().getField('enforce').get(container)
... True  # when True it is not possible to add content when quota is exceeded

Nested quota containers are not supported at the moment.

Changelog

1.0 (2012-06-14)
  • Use plone.app.testing instead of collective.testcaselayer for testing. [jone]
  • Remove unused product initialization. [jone]
  • Update readme. [jone]
  • Fixed test-plone-4.0.x.cfg buildout [lgraf]
1.0b2 (2010-10-26)
  • Added test setup. [lgraf]
1.0b1 (2010-09-16)
  • Fixed default quota in test. [Thomas Buchberger]
  • Add translations [ttschanz]
1.0a3 (2010-04-12)
  • Add german translations for quota exceeded error. [phgross]
1.0a2 (2010-03-29)
  • Fixed bug in setup.py [jone]
1.0a1 (2010-03-29)
  • Package cleanup [jone]
  • Intial implementation [buchberger]

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.