Urguay (uy)

Forms

UY-specific form helpers.

class localflavor.uy.forms.UYCIField(*args, **kwargs)[source]

A field that validates Uruguayan ‘Cedula de identidad’ (CI) numbers.

clean(value)[source]

Validates format and validation digit.

The official format is [X.]XXX.XXX-X but usually dots and/or slash are omitted so, when validating, those characters are ignored if found in the correct place. The three typically used formats are supported: [X]XXXXXXX, [X]XXXXXX-X and [X.]XXX.XXX-X.

class localflavor.uy.forms.UYDepartmentSelect(attrs=None)[source]

A Select widget that uses a list of Uruguayan departments as its choices.

Utilities

localflavor.uy.util.get_validation_digit(number)[source]

Calculates the validation digit for the given number.

Data

localflavor.uy.uy_departments.DEPARTMENT_CHOICES = (('G', 'Artigas'), ('A', 'Canelones'), ('E', 'Cerro Largo'), ('L', 'Colonia'), ('Q', 'Durazno'), ('N', 'Flores'), ('O', 'Florida'), ('P', 'Lavalleja'), ('B', 'Maldonado'), ('S', 'Montevideo'), ('I', 'Paysandú'), ('J', 'Río Negro'), ('F', 'Rivera'), ('C', 'Rocha'), ('H', 'Salto'), ('M', 'San José'), ('K', 'Soriano'), ('R', 'Tacuarembó'), ('D', 'Treinta y Tres'))

A list of Urguayan departments as choices in a formfield.

Table Of Contents

Previous topic

United States of America (us)

Next topic

South Africa (za)

This Page