Pakistan (pk
)¶
Forms¶
Pakistani-specific Form helpers
-
class
localflavor.pk.forms.
PKPhoneNumberField
(max_length=None, min_length=None, *args, **kwargs)[source]¶ A form field that validates input as an Pakistani phone number.
Valid numbers have nine to eleven digits.
Models¶
-
class
localflavor.pk.models.
PKPhoneNumberField
(*args, **kwargs)[source]¶ A model field that checks that the value is a valid Pakistani phone number (nine to eleven digits).
-
description
= 'Pakistani Phone number'¶
-
-
class
localflavor.pk.models.
PKPostCodeField
(*args, **kwargs)[source]¶ A model field that forms represent as a
PKPostCodeField
field and stores the five-digit Pakistani postcode in the database.-
description
= 'Pakistani Postcode'¶
-
Data¶
-
localflavor.pk.pk_states.
STATE_CHOICES
= (('PK-JK', 'Azad Jammu & Kashmir'), ('PK-BA', 'Balochistan'), ('PK-TA', 'Federally Administered Tribal Areas'), ('PK-GB', 'Gilgit-Baltistan'), ('PK-IS', 'Islamabad'), ('PK-KP', 'Khyber Pakhtunkhwa'), ('PK-PB', 'Punjab'), ('PK-SD', 'Sindh'))¶ An alphabetical list of states for use as choices in a formfield.