Country-specific Django helpers for Portugal.
This app has been superseded by the newly created django-localflavor app which recombines all the different country locaflavors again (after having been removed from Django). Development and maintenance of this app has stopped and is only left online as a reminder for the users of those apps. It will be removed after grace period of 1 Django release (~spring 2014).
- forms.PTCitizenCardNumberField: A field which validates Portuguese Citizen Card numbers (locally CC - 'Cartão do Cidadão').
- forms.PTPhoneNumberField: A field which validates Portuguese phone numbers.
- forms.PTRegionSelect: A select widget which uses a list of Portuguese regions as its choices.
- forms.PTSocialSecurityNumberField: A field which validates Portuguese Social Security numbers (locally NISS - 'Número de Identificação na Segurança Social').
- forms.PTZipCodeField: A field which validates Portuguese zip codes.
See the source code for full details.
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 "localflavor" packages, see https://github.com/django/