skip to navigation
skip to content

Not Logged In

collective.address 1.0

Dexterity address behavior.

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.0 (2014-04-30)

  • initial.
 
File Type Py Version Uploaded on Size
collective.address-1.0.tar.gz (md5) Source 2014-04-30 11KB
  • Downloads (All Versions):
  • 1 downloads in the last day
  • 18 downloads in the last week
  • 26 downloads in the last month