Skip to main content

Country-specific Django helpers for New Zealand.

Project description

Country-specific Django helpers for New Zealand.

What’s in the New Zealand localflavor?

  • forms.NZRegionSelect - a Select widget with a list of New Zealand regions.

  • forms.NZProvinceSelect - a Select widget with a list of New Zealand provinces.

  • forms.NZNorthIslandSelect - a Select widget with a list of Norh Island city and district councils.

  • forms.NZSouthIslandSelect - a Select widget with a list of South Island city and district councils.

  • forms.NZPostCodeField - a form field that validates input as a New Zealand postal code. Valid format is XXXX, where X is a digit.

  • forms.NZPhoneNumberField - a form field that validates input as a New Zealand phone number. Validates local and international land line and mobile numbers just as well as 0800 number validation.

See the source code for full details.

About django-localflavor-nz

django_localflavor_nz package was created by Marek Kuziel, because New Zealand “localflavor” didn’t make it to Django before django.contrib.localflavor was deprecated in Django 1.5.

Installation

Simply add django_localflavor_nz to INSTALLED_APPS.

Testing

django test django_localflavor_nz will run the tests for this localflavor.

About localflavors

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.

Their 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 other localflavors, see https://github.com/django/

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django-localflavor-nz-1.0.tar.gz (5.7 kB view details)

Uploaded Source

File details

Details for the file django-localflavor-nz-1.0.tar.gz.

File metadata

File hashes

Hashes for django-localflavor-nz-1.0.tar.gz
Algorithm Hash digest
SHA256 8a6832707184c78f8b4e03b34851404ab5fa5dbb050e76aa023383901de88db0
MD5 a42697c8431752abc450fff5c22554e5
BLAKE2b-256 763e6a86826a8955a5b2d073849b163f45ce108bcf5ace8b69dc7018c0369263

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page