Skip to main content

Country-specific Django helpers for Brazil.

Project description

Country-specific Django helpers for Brazil.

What’s in the Brazil localflavor?

  • forms.BRPhoneNumberField: A form field that validates input as a Brazilian phone number, with the format XX-XXXX-XXXX.

  • forms.BRZipCodeField: A form field that validates input as a Brazilian zip code, with the format XXXXX-XXX.

  • forms.BRStateSelect: A Select widget that uses a list of Brazilian states/territories as its choices.

  • forms.BRCPFField: A form field that validates input as Brazilian CPF. Input can either be of the format XXX.XXX.XXX-VD or be a group of 11 digits.

  • forms.BRCNPJField: A form field that validates input as Brazilian CNPJ. Input can either be of the format XX.XXX.XXX/XXXX-XX or be a group of 14 digits.

See the source code for full details.

About localflavors

Django’s “localflavor” packages offer additional functionality for particular countries or cultures.

For example, these might include form fields for your country’s postal codes, phone number formats or government ID numbers.

This code used to live in Django proper – in django.contrib.localflavor – but was separated into standalone packages in Django 1.5 to keep the framework’s core clean.

For a full list of available localflavors, see https://github.com/django/

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

axado.django-localflavor-br-1.0.1.tar.gz (6.0 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