mirror of
https://github.com/django/django.git
synced 2025-07-24 13:44:32 +00:00
Fixed #15856 -- Added Macedonian localflavor. Many thanks to vasiliyeah.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16385 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
9f3d76a921
commit
050e11956f
13 changed files with 622 additions and 3 deletions
|
@ -57,6 +57,7 @@ Countries currently supported by :mod:`~django.contrib.localflavor` are:
|
|||
* Italy_
|
||||
* Japan_
|
||||
* Kuwait_
|
||||
* Macedonia_
|
||||
* Mexico_
|
||||
* `The Netherlands`_
|
||||
* Norway_
|
||||
|
@ -110,6 +111,7 @@ Here's an example of how to use them::
|
|||
.. _Italy: `Italy (it)`_
|
||||
.. _Japan: `Japan (jp)`_
|
||||
.. _Kuwait: `Kuwait (kw)`_
|
||||
.. _Macedonia: `Macedonia (mk)`_
|
||||
.. _Mexico: `Mexico (mx)`_
|
||||
.. _Norway: `Norway (no)`_
|
||||
.. _Peru: `Peru (pe)`_
|
||||
|
@ -652,8 +654,6 @@ Israel (``il``)
|
|||
.. _Israeli identification number: http://he.wikipedia.org/wiki/%D7%9E%D7%A1%D7%A4%D7%A8_%D7%96%D7%94%D7%95%D7%AA_(%D7%99%D7%A9%D7%A8%D7%90%D7%9C)
|
||||
.. _Luhn algorithm: http://en.wikipedia.org/wiki/Luhn_algorithm
|
||||
|
||||
|
||||
|
||||
Italy (``it``)
|
||||
==============
|
||||
|
||||
|
@ -705,6 +705,57 @@ Kuwait (``kw``)
|
|||
* The birthdate of the person is a valid date.
|
||||
* The calculated checksum equals to the last digit of the Civil ID.
|
||||
|
||||
Macedonia (``mk``)
|
||||
===================
|
||||
|
||||
.. versionadded:: 1.4
|
||||
|
||||
.. class:: mk.forms.MKIdentityCardNumberField
|
||||
|
||||
A form field that validates input as a Macedonian identity card number.
|
||||
Both old and new identity card numbers are supported.
|
||||
|
||||
|
||||
.. class:: mk.forms.MKMunicipalitySelect
|
||||
|
||||
A form ``Select`` widget that uses a list of Macedonian municipalities as
|
||||
choices.
|
||||
|
||||
|
||||
.. class:: mk.forms.UMCNField
|
||||
|
||||
A form field that validates input as a unique master citizen
|
||||
number.
|
||||
|
||||
The format of the unique master citizen number is not unique
|
||||
to Macedonia. For more information see:
|
||||
https://secure.wikimedia.org/wikipedia/en/wiki/Unique_Master_Citizen_Number
|
||||
|
||||
A value will pass validation if it complies to the following rules:
|
||||
|
||||
* Consists of exactly 13 digits
|
||||
* The first 7 digits represent a valid past date in the format DDMMYYY
|
||||
* The last digit of the UMCN passes a checksum test
|
||||
|
||||
|
||||
.. class:: mk.models.MKIdentityCardNumberField
|
||||
|
||||
A model field that forms represent as a
|
||||
``forms.MKIdentityCardNumberField`` field.
|
||||
|
||||
|
||||
.. class:: mk.models.MKMunicipalityField
|
||||
|
||||
A model field that forms represent as a
|
||||
``forms.MKMunicipalitySelect`` and stores the 2 character code of the
|
||||
municipality in the database.
|
||||
|
||||
|
||||
.. class:: mk.models.UMCNField
|
||||
|
||||
A model field that forms represent as a ``forms.UMCNField`` field.
|
||||
|
||||
|
||||
Mexico (``mx``)
|
||||
===============
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue