New Zealand (nz)

New in version 1.1.

Forms

New Zealand specific form helpers

class localflavor.nz.forms.NZBankAccountNumberField(required=True, widget=None, label=None, initial=None, help_text=u'', error_messages=None, show_hidden_initial=False, validators=[], localize=False)[source]

A form field that validates its input as New Zealand bank account number.

Formats:

XX-XXXX-XXXXXXX-XX

XX-XXXX-XXXXXXX-XXX

Where:

  • the first two digits is the bank ID
  • the next four digits are the branch number where the account was opened
  • the next 7 digits are the account numbers
  • the last two or three digits define type of the account.
class localflavor.nz.forms.NZNorthIslandCouncilSelect(attrs=None)[source]

A select widget with list of New Zealand North Island city and district councils as its choices.

class localflavor.nz.forms.NZPhoneNumberField(required=True, widget=None, label=None, initial=None, help_text=u'', error_messages=None, show_hidden_initial=False, validators=[], localize=False)[source]

A form field that validates its input as New Zealand phone number.

class localflavor.nz.forms.NZPostCodeField(*args, **kwargs)[source]

A form field that validates its input as New Zealand postal code.

class localflavor.nz.forms.NZProvinceSelect(attrs=None)[source]

A select widget with list of New Zealand provinces as its choices.

class localflavor.nz.forms.NZRegionSelect(attrs=None)[source]

A select widget with list of New Zealand regions as its choices.

class localflavor.nz.forms.NZSouthIslandCouncilSelect(attrs=None)[source]

A select widget with list of New Zealand South Island city and district councils as its choices.

Data

localflavor.nz.nz_regions.REGION_CHOICES = ((u'NZ-NTL', <django.utils.functional.__proxy__ object at 0x7f1e9cfb5650>), (u'NZ-AUK', <django.utils.functional.__proxy__ object at 0x7f1e9cdcdf90>), (u'NZ-WKO', <django.utils.functional.__proxy__ object at 0x7f1e9cdcd1d0>), (u'NZ-BOP', <django.utils.functional.__proxy__ object at 0x7f1e9cdcd290>), (u'NZ-GIS', <django.utils.functional.__proxy__ object at 0x7f1e9cdcdb90>), (u'NZ-HKB', <django.utils.functional.__proxy__ object at 0x7f1e9cdcd050>), (u'NZ-TKI', <django.utils.functional.__proxy__ object at 0x7f1e9cdcdf50>), (u'NZ-MWT', <django.utils.functional.__proxy__ object at 0x7f1e9cdcde50>), (u'NZ-WGN', <django.utils.functional.__proxy__ object at 0x7f1e9cdcd190>), (u'NZ-TAS', <django.utils.functional.__proxy__ object at 0x7f1e9d7c9c50>), (u'NZ-NSN', <django.utils.functional.__proxy__ object at 0x7f1e9d7c9dd0>), (u'NZ-MBH', <django.utils.functional.__proxy__ object at 0x7f1e9d7c9f50>), (u'NZ-WTC', <django.utils.functional.__proxy__ object at 0x7f1e9d7c9f10>), (u'NZ-CAN', <django.utils.functional.__proxy__ object at 0x7f1e9d7c9b10>), (u'NZ-OTA', <django.utils.functional.__proxy__ object at 0x7f1e9d80bf50>), (u'NZ-STL', <django.utils.functional.__proxy__ object at 0x7f1e9d80bf90>))

A list of regions

localflavor.nz.nz_provinces.PROVINCE_CHOICES = ((u'Auckland', <django.utils.functional.__proxy__ object at 0x7f1e9d80bd10>), (u'Taranaki', <django.utils.functional.__proxy__ object at 0x7f1e9cdeb690>), (u"Hawke's Bay", <django.utils.functional.__proxy__ object at 0x7f1e9cdebc90>), (u'Wellington', <django.utils.functional.__proxy__ object at 0x7f1e9cdebd10>), (u'Marlborough', <django.utils.functional.__proxy__ object at 0x7f1e9cdebbd0>), (u'Nelson', <django.utils.functional.__proxy__ object at 0x7f1e9cdeb850>), (u'Canterbury', <django.utils.functional.__proxy__ object at 0x7f1e9cdeb990>), (u'South Canterbury', <django.utils.functional.__proxy__ object at 0x7f1e9cdebcd0>), (u'Westland', <django.utils.functional.__proxy__ object at 0x7f1e9cdebd90>), (u'Otago', <django.utils.functional.__proxy__ object at 0x7f1e9cdebe10>), (u'Southland', <django.utils.functional.__proxy__ object at 0x7f1e9cdeb090>), (u'Chatham Islands', <django.utils.functional.__proxy__ object at 0x7f1e9cdeb890>))

A list of provinces (abolished in 1876, use regions instead)

localflavor.nz.nz_councils.NORTH_ISLAND_COUNCIL_CHOICES = ((u'Far North', <django.utils.functional.__proxy__ object at 0x7f1e9d98ec50>), (u'Whangarei', <django.utils.functional.__proxy__ object at 0x7f1e9d98e950>), (u'Kaipara', <django.utils.functional.__proxy__ object at 0x7f1e9d98ef10>), (u'Auckland', <django.utils.functional.__proxy__ object at 0x7f1e9d98e210>), (u'Thames-Coromandel', <django.utils.functional.__proxy__ object at 0x7f1e9d98e590>), (u'Hauraki', <django.utils.functional.__proxy__ object at 0x7f1e9d98ef50>), (u'Waikato', <django.utils.functional.__proxy__ object at 0x7f1e9d98e290>), (u'Matamata-Piako', <django.utils.functional.__proxy__ object at 0x7f1e9d98e9d0>), (u'Hamilton', <django.utils.functional.__proxy__ object at 0x7f1e9d98e5d0>), (u'Waipa', <django.utils.functional.__proxy__ object at 0x7f1e9d98e310>), (u'South Waikato', <django.utils.functional.__proxy__ object at 0x7f1e9d98e4d0>), (u'Otorohanga', <django.utils.functional.__proxy__ object at 0x7f1e9d98e7d0>), (u'Waitomo', <django.utils.functional.__proxy__ object at 0x7f1e9c9b5450>), (u'Taupo', <django.utils.functional.__proxy__ object at 0x7f1e9c9b5390>), (u'Western Bay of Plenty', <django.utils.functional.__proxy__ object at 0x7f1e9c9b5190>), (u'Tauranga', <django.utils.functional.__proxy__ object at 0x7f1e9c9b5f90>), (u'Opotiki', <django.utils.functional.__proxy__ object at 0x7f1e9c9b53d0>), (u'Whakatane', <django.utils.functional.__proxy__ object at 0x7f1e9c9b5490>), (u'Rotorua\t', <django.utils.functional.__proxy__ object at 0x7f1e9c9b5d50>), (u'Kawerau', <django.utils.functional.__proxy__ object at 0x7f1e9c9b5c50>), (u'Gisborne', <django.utils.functional.__proxy__ object at 0x7f1e9c9b5b50>), (u'Wairoa', <django.utils.functional.__proxy__ object at 0x7f1e9c9b5a10>), (u'Hastings', <django.utils.functional.__proxy__ object at 0x7f1e9c9b5910>), (u'Napier', <django.utils.functional.__proxy__ object at 0x7f1e9c9b5810>), (u"Central Hawke's Bay", <django.utils.functional.__proxy__ object at 0x7f1e9c9b5c10>), (u'New Plymouth', <django.utils.functional.__proxy__ object at 0x7f1e9c9b59d0>), (u'Stratford', <django.utils.functional.__proxy__ object at 0x7f1e9c9b57d0>), (u'South Taranaki', <django.utils.functional.__proxy__ object at 0x7f1e9c9b55d0>), (u'Ruapehu', <django.utils.functional.__proxy__ object at 0x7f1e9c9b5610>), (u'Rangitikei', <django.utils.functional.__proxy__ object at 0x7f1e9c9b5650>), (u'Wanganui', <django.utils.functional.__proxy__ object at 0x7f1e9c9b5e10>), (u'Manawatu', <django.utils.functional.__proxy__ object at 0x7f1e9c9b5250>), (u'Palmerston North', <django.utils.functional.__proxy__ object at 0x7f1e9c9b5310>), (u'Tararua', <django.utils.functional.__proxy__ object at 0x7f1e9c9b5dd0>), (u'Horowhenua', <django.utils.functional.__proxy__ object at 0x7f1e9c9b5cd0>), (u'Masterton', <django.utils.functional.__proxy__ object at 0x7f1e9c9b5a90>), (u'Kapiti Coast', <django.utils.functional.__proxy__ object at 0x7f1e9c9b5890>), (u'Carterton', <django.utils.functional.__proxy__ object at 0x7f1e9cfb5590>), (u'South Wairarapa', <django.utils.functional.__proxy__ object at 0x7f1e9cfb5550>), (u'Upper Hutt', <django.utils.functional.__proxy__ object at 0x7f1e9cfb5410>), (u'Porirua', <django.utils.functional.__proxy__ object at 0x7f1e9cfb5510>), (u'Hutt', <django.utils.functional.__proxy__ object at 0x7f1e9cfb5050>), (u'Wellington', <django.utils.functional.__proxy__ object at 0x7f1e9cfb5750>))

A list of North Island city and district councils

localflavor.nz.nz_councils.SOUTH_ISLAND_COUNCIL_CHOICES = ((u'Tasman', <django.utils.functional.__proxy__ object at 0x7f1e9cfb56d0>), (u'Nelson', <django.utils.functional.__proxy__ object at 0x7f1e9cfb58d0>), (u'Marlborough', <django.utils.functional.__proxy__ object at 0x7f1e9cfb5dd0>), (u'Buller', <django.utils.functional.__proxy__ object at 0x7f1e9cfb54d0>), (u'Grey', <django.utils.functional.__proxy__ object at 0x7f1e9cfb5790>), (u'Westland', <django.utils.functional.__proxy__ object at 0x7f1e9cfb5d90>), (u'Kaikoura', <django.utils.functional.__proxy__ object at 0x7f1e9cfb5a10>), (u'Hurunui', <django.utils.functional.__proxy__ object at 0x7f1e9cfb5850>), (u'Selwyn', <django.utils.functional.__proxy__ object at 0x7f1e9cfb5ed0>), (u'Waimakariri', <django.utils.functional.__proxy__ object at 0x7f1e9cfb52d0>), (u'Christchurch', <django.utils.functional.__proxy__ object at 0x7f1e9cfb59d0>), (u'Ashburton', <django.utils.functional.__proxy__ object at 0x7f1e9cfb5c10>), (u'Mackenzie', <django.utils.functional.__proxy__ object at 0x7f1e9cfb5810>), (u'Timaru', <django.utils.functional.__proxy__ object at 0x7f1e9cfb5150>), (u'Waimate', <django.utils.functional.__proxy__ object at 0x7f1e9cfb5690>), (u'Waitaki', <django.utils.functional.__proxy__ object at 0x7f1e9cfb5110>), (u'Queenstown-Lakes', <django.utils.functional.__proxy__ object at 0x7f1e9cfb5d50>), (u'Central Otago', <django.utils.functional.__proxy__ object at 0x7f1e9cfb55d0>), (u'Dunedin', <django.utils.functional.__proxy__ object at 0x7f1e9cfb50d0>), (u'Clutha', <django.utils.functional.__proxy__ object at 0x7f1e9cfb51d0>), (u'Southland', <django.utils.functional.__proxy__ object at 0x7f1e9cfb57d0>), (u'Gore', <django.utils.functional.__proxy__ object at 0x7f1e9cfb5250>), (u'Invercargill', <django.utils.functional.__proxy__ object at 0x7f1e9cfb5f50>))

A list of South Island city and district councils