Argentina (ar)

AR-specific Form helpers.

class localflavor.ar.forms.ARCBUField(*, max_length=None, min_length=None, strip=True, empty_value='', **kwargs)[source]

This field validates a CBU (Clave Bancaria Uniforme).

A CBU is a 22-digits long number. The first 8 digits denote bank and branch number, plus a verifying digit. The remaining 14 digits denote an account number, plus a verifying digit.

More info: https://es.wikipedia.org/wiki/Clave_Bancaria_Uniforme

New in version 1.3.

Changed in version 3.0.

clean(value)[source]

Value must be a 22 digits long number.

class localflavor.ar.forms.ARCUITField(**kwargs)[source]

This field validates a CUIT (Código Único de Identificación Tributaria).

A CUIT is of the form XX-XXXXXXXX-V. The last digit is a check digit.

More info: http://es.wikipedia.org/wiki/Clave_%C3%9Anica_de_Identificaci%C3%B3n_Tributaria

Info in English: http://www.justlanded.com/english/Argentina/Argentina-Guide/Visas-Permits/Other-Legal-Documents

Changed in version 2.1: ARCUITField now also accepts CUIT with prefix 34.

clean(value)[source]

Value can be either a string in the format XX-XXXXXXXX-X or an 11-digit number.

class localflavor.ar.forms.ARDNIField(max_length=10, min_length=7, **kwargs)[source]

A field that validates ‘Documento Nacional de Identidad’ (DNI) numbers.

clean(value)[source]

Value can be a string either in the [X]X.XXX.XXX or [X]XXXXXXX formats.

class localflavor.ar.forms.ARPostalCodeField(max_length=8, min_length=4, **kwargs)[source]

A field that accepts a ‘classic’ NNNN Postal Code or a CPA.

See:

clean(value)[source]

Validate the given value and return its “cleaned” value as an appropriate Python object. Raise ValidationError for any errors.

class localflavor.ar.forms.ARProvinceSelect(attrs=None)[source]

A Select widget that uses a list of Argentinean provinces/autonomous cities as its choices.

localflavor.ar.ar_provinces.PROVINCE_CHOICES = (('B', 'Buenos Aires'), ('K', 'Catamarca'), ('H', 'Chaco'), ('U', 'Chubut'), ('C', 'Ciudad Autónoma de Buenos Aires'), ('X', 'Córdoba'), ('W', 'Corrientes'), ('E', 'Entre Ríos'), ('P', 'Formosa'), ('Y', 'Jujuy'), ('L', 'La Pampa'), ('F', 'La Rioja'), ('M', 'Mendoza'), ('N', 'Misiones'), ('Q', 'Neuquén'), ('R', 'Río Negro'), ('A', 'Salta'), ('J', 'San Juan'), ('D', 'San Luis'), ('Z', 'Santa Cruz'), ('S', 'Santa Fe'), ('G', 'Santiago del Estero'), ('V', 'Tierra del Fuego, Antártida e Islas del Atlántico Sur'), ('T', 'Tucumán'))

A list of Argentinean provinces and autonomous cities as choices in a formfield. From http://www.argentina.gov.ar/argentina/portal/paginas.dhtml?pagina=425