I don't know of a single form field for addresses, but you can use localflavor
to validate the input and a combo of MultiWidget
and MultiValueField
for creating an address field. Mine looks something like this:
class SplitAddressWidget(forms.MultiWidget):
def __init__(self, attrs=None):
widgets = []
widgets.append(forms.TextInput(attrs=attrs))
widgets.append(forms.TextInput(attrs=attrs))
widgets.append(forms.TextInput(attrs=attrs))
widgets.append(forms.TextInput(attrs=attrs))
widgets.append(forms.TextInput(attrs=attrs))
super(SplitAddressWidget, self).__init__(widgets, attrs)
...
class SplitAddressField(forms.MultiValueField):
widget = SplitAddressWidget
def __init__(self, *args, **kwargs):
fields = (
forms.CharField(required=kwargs['required']),
forms.CharField(required=0),
forms.CharField(required=kwargs['required']),
USStateField(required=kwargs['required']),
USZipCodeField(required=kwargs['required']),
)
super(SplitAddressField, self).__init__(fields, *args, **kwargs)
...
There is more code involved, but it is a bit much to paste in here. This info should get you headed in the right direction.