Skip to main content

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]

Release files for ftw.quota 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 ftw.quota 1.0
File Size Uploaded
ftw.quota-1.0.zip 25.4 kB Details

Release files / ftw.quota-1.0.zip

Download URL ftw.quota-1.0.zip
Size 25.4 kB
Tags Source
SHA-256 checksum
How to use checksums
446a3f9cb4d4ace91376835767bc9be865e46937cfa1618676dda6f056e9f59b
BLAKE2b-256 checksum
How to use checksums
697cad2861ad610c0d60c6ff8667ff11c511f8f126b9f6b0561a559c955743e0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

1.0 This release

1 release file

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