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 0x7f953ede5050>), (u'NZ-AUK', <django.utils.functional.__proxy__ object at 0x7f953ede52d0>), (u'NZ-WKO', <django.utils.functional.__proxy__ object at 0x7f953ede50d0>), (u'NZ-BOP', <django.utils.functional.__proxy__ object at 0x7f953f591810>), (u'NZ-GIS', <django.utils.functional.__proxy__ object at 0x7f953f591d90>), (u'NZ-HKB', <django.utils.functional.__proxy__ object at 0x7f953f591c10>), (u'NZ-TKI', <django.utils.functional.__proxy__ object at 0x7f953f591210>), (u'NZ-MWT', <django.utils.functional.__proxy__ object at 0x7f953f591190>), (u'NZ-WGN', <django.utils.functional.__proxy__ object at 0x7f953f5917d0>), (u'NZ-TAS', <django.utils.functional.__proxy__ object at 0x7f953f5910d0>), (u'NZ-NSN', <django.utils.functional.__proxy__ object at 0x7f953f591bd0>), (u'NZ-MBH', <django.utils.functional.__proxy__ object at 0x7f953f591350>), (u'NZ-WTC', <django.utils.functional.__proxy__ object at 0x7f953f591c90>), (u'NZ-CAN', <django.utils.functional.__proxy__ object at 0x7f953f591050>), (u'NZ-OTA', <django.utils.functional.__proxy__ object at 0x7f953f591cd0>), (u'NZ-STL', <django.utils.functional.__proxy__ object at 0x7f953f591290>))

A list of regions

localflavor.nz.nz_provinces.PROVINCE_CHOICES = ((u'Auckland', <django.utils.functional.__proxy__ object at 0x7f953f591b10>), (u'Taranaki', <django.utils.functional.__proxy__ object at 0x7f953f591c50>), (u"Hawke's Bay", <django.utils.functional.__proxy__ object at 0x7f953ef21b90>), (u'Wellington', <django.utils.functional.__proxy__ object at 0x7f953ef21e50>), (u'Marlborough', <django.utils.functional.__proxy__ object at 0x7f953ef21690>), (u'Nelson', <django.utils.functional.__proxy__ object at 0x7f953ef21410>), (u'Canterbury', <django.utils.functional.__proxy__ object at 0x7f953ef21ad0>), (u'South Canterbury', <django.utils.functional.__proxy__ object at 0x7f953ef213d0>), (u'Westland', <django.utils.functional.__proxy__ object at 0x7f953ef21510>), (u'Otago', <django.utils.functional.__proxy__ object at 0x7f953ef21650>), (u'Southland', <django.utils.functional.__proxy__ object at 0x7f953ef21850>), (u'Chatham Islands', <django.utils.functional.__proxy__ object at 0x7f953ef21f50>))

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 0x7f953f80b5d0>), (u'Whangarei', <django.utils.functional.__proxy__ object at 0x7f953f80b910>), (u'Kaipara', <django.utils.functional.__proxy__ object at 0x7f953f80bb90>), (u'Auckland', <django.utils.functional.__proxy__ object at 0x7f953f80bb50>), (u'Thames-Coromandel', <django.utils.functional.__proxy__ object at 0x7f953f80b750>), (u'Hauraki', <django.utils.functional.__proxy__ object at 0x7f953f80b550>), (u'Waikato', <django.utils.functional.__proxy__ object at 0x7f953f80b890>), (u'Matamata-Piako', <django.utils.functional.__proxy__ object at 0x7f953f80b3d0>), (u'Hamilton', <django.utils.functional.__proxy__ object at 0x7f953f80bf50>), (u'Waipa', <django.utils.functional.__proxy__ object at 0x7f953f80b050>), (u'South Waikato', <django.utils.functional.__proxy__ object at 0x7f953f80b2d0>), (u'Otorohanga', <django.utils.functional.__proxy__ object at 0x7f953f80b4d0>), (u'Waitomo', <django.utils.functional.__proxy__ object at 0x7f953f80be90>), (u'Taupo', <django.utils.functional.__proxy__ object at 0x7f953f80b450>), (u'Western Bay of Plenty', <django.utils.functional.__proxy__ object at 0x7f953f80b390>), (u'Tauranga', <django.utils.functional.__proxy__ object at 0x7f953f80b350>), (u'Opotiki', <django.utils.functional.__proxy__ object at 0x7f953fe47450>), (u'Whakatane', <django.utils.functional.__proxy__ object at 0x7f953fe47fd0>), (u'Rotorua\t', <django.utils.functional.__proxy__ object at 0x7f953fe47f10>), (u'Kawerau', <django.utils.functional.__proxy__ object at 0x7f953fe47ed0>), (u'Gisborne', <django.utils.functional.__proxy__ object at 0x7f953fe47f50>), (u'Wairoa', <django.utils.functional.__proxy__ object at 0x7f953fe47790>), (u'Hastings', <django.utils.functional.__proxy__ object at 0x7f953fe47050>), (u'Napier', <django.utils.functional.__proxy__ object at 0x7f953fe47b10>), (u"Central Hawke's Bay", <django.utils.functional.__proxy__ object at 0x7f953fe475d0>), (u'New Plymouth', <django.utils.functional.__proxy__ object at 0x7f953fe47c90>), (u'Stratford', <django.utils.functional.__proxy__ object at 0x7f953fe47710>), (u'South Taranaki', <django.utils.functional.__proxy__ object at 0x7f953fe478d0>), (u'Ruapehu', <django.utils.functional.__proxy__ object at 0x7f953fe47950>), (u'Rangitikei', <django.utils.functional.__proxy__ object at 0x7f953fe47d10>), (u'Wanganui', <django.utils.functional.__proxy__ object at 0x7f953fe47690>), (u'Manawatu', <django.utils.functional.__proxy__ object at 0x7f953fe47910>), (u'Palmerston North', <django.utils.functional.__proxy__ object at 0x7f953fe47610>), (u'Tararua', <django.utils.functional.__proxy__ object at 0x7f953fe476d0>), (u'Horowhenua', <django.utils.functional.__proxy__ object at 0x7f953fe47cd0>), (u'Masterton', <django.utils.functional.__proxy__ object at 0x7f953fe47890>), (u'Kapiti Coast', <django.utils.functional.__proxy__ object at 0x7f953fe47a90>), (u'Carterton', <django.utils.functional.__proxy__ object at 0x7f953fe47810>), (u'South Wairarapa', <django.utils.functional.__proxy__ object at 0x7f953fe47990>), (u'Upper Hutt', <django.utils.functional.__proxy__ object at 0x7f953ede5750>), (u'Porirua', <django.utils.functional.__proxy__ object at 0x7f953ede51d0>), (u'Hutt', <django.utils.functional.__proxy__ object at 0x7f953ede55d0>), (u'Wellington', <django.utils.functional.__proxy__ object at 0x7f953ede5490>))

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 0x7f953ede5d50>), (u'Nelson', <django.utils.functional.__proxy__ object at 0x7f953ede5dd0>), (u'Marlborough', <django.utils.functional.__proxy__ object at 0x7f953ede5390>), (u'Buller', <django.utils.functional.__proxy__ object at 0x7f953ede5ed0>), (u'Grey', <django.utils.functional.__proxy__ object at 0x7f953ede58d0>), (u'Westland', <django.utils.functional.__proxy__ object at 0x7f953ede5450>), (u'Kaikoura', <django.utils.functional.__proxy__ object at 0x7f953ede5a50>), (u'Hurunui', <django.utils.functional.__proxy__ object at 0x7f953ede5a10>), (u'Selwyn', <django.utils.functional.__proxy__ object at 0x7f953ede5550>), (u'Waimakariri', <django.utils.functional.__proxy__ object at 0x7f953ede5710>), (u'Christchurch', <django.utils.functional.__proxy__ object at 0x7f953ede5c50>), (u'Ashburton', <django.utils.functional.__proxy__ object at 0x7f953ede59d0>), (u'Mackenzie', <django.utils.functional.__proxy__ object at 0x7f953ede5850>), (u'Timaru', <django.utils.functional.__proxy__ object at 0x7f953ede5b90>), (u'Waimate', <django.utils.functional.__proxy__ object at 0x7f953ede5590>), (u'Waitaki', <django.utils.functional.__proxy__ object at 0x7f953ede5910>), (u'Queenstown-Lakes', <django.utils.functional.__proxy__ object at 0x7f953ede5950>), (u'Central Otago', <django.utils.functional.__proxy__ object at 0x7f953ede5bd0>), (u'Dunedin', <django.utils.functional.__proxy__ object at 0x7f953ede5e50>), (u'Clutha', <django.utils.functional.__proxy__ object at 0x7f953ede5ad0>), (u'Southland', <django.utils.functional.__proxy__ object at 0x7f953ede5110>), (u'Gore', <django.utils.functional.__proxy__ object at 0x7f953ede5350>), (u'Invercargill', <django.utils.functional.__proxy__ object at 0x7f953ede57d0>))

A list of South Island city and district councils