The Netherlands (nl
)¶
Forms¶
NL-specific Form helpers.
-
class
localflavor.nl.forms.
NLBSNFormField
(**kwargs)[source]¶ A Dutch social security number (BSN) field.
https://nl.wikipedia.org/wiki/Burgerservicenummer
Note that you may only process the BSN if you have a legal basis to do so!
New in version 1.6.
-
class
localflavor.nl.forms.
NLLicensePlateFormField
(**kwargs)[source]¶ A Dutch license plate field.
https://www.rdw.nl/ https://nl.wikipedia.org/wiki/Nederlands_kenteken
New in version 2.1.
Models¶
-
class
localflavor.nl.models.
NLBSNField
(*args, **kwargs)[source]¶ A Dutch social security number (BSN).
This model field uses
validators.NLBSNFieldValidator
for validation.New in version 1.6.
-
description
= 'Dutch social security number (BSN)'¶
-
validators
= [<localflavor.nl.validators.NLBSNFieldValidator object>]¶
-
-
class
localflavor.nl.models.
NLLicensePlateField
(*args, **kwargs)[source]¶ A Dutch license plate.
This model field uses
validators.NLLicensePlateFieldValidator
for validation.New in version 2.1.
-
default_form_field
¶
-
description
= 'Dutch license plate'¶
-
validators
= [<localflavor.nl.validators.NLLicensePlateFieldValidator object>]¶
-
-
class
localflavor.nl.models.
NLProvinceField
(*args, **kwargs)[source]¶ A Dutch Province field.
New in version 1.3.
-
deconstruct
()[source]¶ Return enough information to recreate the field as a 4-tuple:
- The name of the field on the model, if contribute_to_class() has been run.
- The import path of the field, including the class:e.g. django.db.models.IntegerField This should be the most portable version, so less specific may be better.
- A list of positional arguments.
- A dict of keyword arguments.
Note that the positional or keyword arguments must contain values of the following types (including inner values of collection types):
- None, bool, str, int, float, complex, set, frozenset, list, tuple, dict
- UUID
- datetime.datetime (naive), datetime.date
- top-level classes, top-level functions - will be referenced by their full import path
- Storage instances - these have their own deconstruct() method
This is because the values here must be serialized into a text format (possibly new Python code, possibly JSON) and these are the only types with encoding handlers defined.
There’s no need to return the exact way the field was instantiated this time, just ensure that the resulting field is the same - prefer keyword arguments over positional ones, and omit parameters with their default values.
-
description
= 'Dutch province'¶
-
-
class
localflavor.nl.models.
NLZipCodeField
(*args, **kwargs)[source]¶ A Dutch zip code model field.
This model field uses
validators.NLZipCodeFieldValidator
for validation.New in version 1.3.
-
description
= 'Dutch zipcode'¶
-
to_python
(value)[source]¶ Convert the input value into the expected Python data type, raising django.core.exceptions.ValidationError if the data can’t be converted. Return the converted value. Subclasses should override this.
-
validators
= [<localflavor.nl.validators.NLZipCodeFieldValidator object>]¶
-
Data¶
-
localflavor.nl.nl_provinces.
PROVINCE_CHOICES
= (('DR', 'Drenthe'), ('FL', 'Flevoland'), ('FR', 'Fryslân'), ('GL', 'Gelderland'), ('GR', 'Groningen'), ('LB', 'Limburg'), ('NB', 'Noord-Brabant'), ('NH', 'Noord-Holland'), ('OV', 'Overijssel'), ('UT', 'Utrecht'), ('ZE', 'Zeeland'), ('ZH', 'Zuid-Holland'))¶ An alphabetical list of provinces