Portugal (pt)¶
Forms¶
django_localflavot_pt.forms¶
Contains PT-specific Django form helpers.
-
class
localflavor.pt.forms.PTCitizenCardNumberField(required=True, widget=None, label=None, initial=None, help_text=u'', error_messages=None, show_hidden_initial=False, validators=[], localize=False)[source]¶ A field which validates Portuguese Citizen Card numbers (locally CC - ‘Cartão do Cidadão’).
- Citizen Card numbers have the format XXXXXXXXXYYX or XXXXXXXX-XYYX (where X is a digit and Y is an alphanumeric character).
- Citizen Card numbers validate as per http://bit.ly/RP0BzW.
- The input string may or may not have an hyphen separating the identity number from the document’s check-digits.
- This field does NOT validate old ID card numbers (locally BI - ‘Bilhete de Identidade’).
-
class
localflavor.pt.forms.PTPhoneNumberField(required=True, widget=None, label=None, initial=None, help_text=u'', error_messages=None, show_hidden_initial=False, validators=[], localize=False)[source]¶ A field which validates Portuguese phone numbers.
- Phone numbers have at least 3 and at most 9 digits and may optionally be prefixed with ‘00351’ or ‘+351’.
- The input string is allowed to contain spaces (though they will be stripped).
-
class
localflavor.pt.forms.PTRegionSelect(attrs=None)[source]¶ A select widget which uses a list of Portuguese regions as its choices.
- Regions correspond to the Portuguese ‘distritos’ and ‘regiões autónomas’ as per ISO3166:2-PT.
-
class
localflavor.pt.forms.PTSocialSecurityNumberField(required=True, widget=None, label=None, initial=None, help_text=u'', error_messages=None, show_hidden_initial=False, validators=[], localize=False)[source]¶ A field which validates Portuguese Social Security numbers (locally NISS - ‘Número de Identificação na Segurança Social’).
- Social Security numbers must be in the format XYYYYYYYYYY (where X is either 1 or 2 and Y is any other digit).
Data¶
-
localflavor.pt.pt_regions.REGION_CHOICES= ((u'01', <django.utils.functional.__proxy__ object at 0x7f1e9c30c0d0>), (u'02', <django.utils.functional.__proxy__ object at 0x7f1e9c30c050>), (u'03', <django.utils.functional.__proxy__ object at 0x7f1e9c30c190>), (u'04', <django.utils.functional.__proxy__ object at 0x7f1e9c30c210>), (u'05', <django.utils.functional.__proxy__ object at 0x7f1e9c30c290>), (u'06', <django.utils.functional.__proxy__ object at 0x7f1e9c30c310>), (u'07', <django.utils.functional.__proxy__ object at 0x7f1e9c30c390>), (u'08', <django.utils.functional.__proxy__ object at 0x7f1e9c30c410>), (u'09', <django.utils.functional.__proxy__ object at 0x7f1e9c30c490>), (u'10', <django.utils.functional.__proxy__ object at 0x7f1e9c30c510>), (u'11', <django.utils.functional.__proxy__ object at 0x7f1e9c30c590>), (u'12', <django.utils.functional.__proxy__ object at 0x7f1e9c30c610>), (u'13', <django.utils.functional.__proxy__ object at 0x7f1e9c30c690>), (u'14', <django.utils.functional.__proxy__ object at 0x7f1e9c30c710>), (u'15', <django.utils.functional.__proxy__ object at 0x7f1e9c30c790>), (u'16', <django.utils.functional.__proxy__ object at 0x7f1e9c30c810>), (u'17', <django.utils.functional.__proxy__ object at 0x7f1e9c30c890>), (u'18', <django.utils.functional.__proxy__ object at 0x7f1e9c30c910>), (u'20', <django.utils.functional.__proxy__ object at 0x7f1e9c30c990>), (u'30', <django.utils.functional.__proxy__ object at 0x7f1e9c30ca10>))¶ A tuple representing Portuguese regions (as per ISO3166:2-PT).