Skip to main content

Dexterity address behavior.

Project description

collective.address

This package provides an Dexterity behavior for location addresses to be used in Dexterity based types.

How to provide a default value for the country field

If you want to provide a default value for the IAddress’ country field, you can provide an ComputedWidgetAttribute adapter like so:

from zope.component import provideAdapter
from z3c.form.widget import ComputedWidgetAttribute
from collective.address.behaviors import IAddress
DEFAULT_COUNTRY = "040"  # Austria
provideAdapter(ComputedWidgetAttribute(
    lambda data: DEFAULT_COUNTRY,
    field=IAddress['country']), name='default')

Changelog

1.1 (2015-03-04)

  • Add IContact and IPerson behaviors in addition to the IAddress behavior. [thet]

  • PEP 8. [thet]

1.0 (2014-04-30)

  • initial.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

collective.address-1.1.tar.gz (12.3 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page