Opened 7 years ago

Closed 6 years ago

Last modified 5 years ago

#11350 closed (fixed)

Support "local flavor" for Israel

Reported by: Yuval Adam Owned by: Yuval Adam
Component: contrib.localflavor Version: master
Severity: Keywords: local flavor israel
Cc: Shai Berger Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

Support django.contrib.localflavor for Israel

Attachments (7)

forms.py (1.7 KB) - added by Yuval Adam 7 years ago.
Forms for Israel local flavor
il.py (1.4 KB) - added by Yuval Adam 7 years ago.
Added regression tests
11350.diff (5.2 KB) - added by Yuval Adam 6 years ago.
Updated proper diff, with tests and docs
django-11350.diff (5.8 KB) - added by Alex Gaynor 6 years ago.
Converted tests to unittests.
django-11350.2.diff (5.5 KB) - added by Alex Gaynor 6 years ago.
Use the luhn function as suggested by jezdez.
django-11350.3.diff (6.5 KB) - added by Idan Gazit 6 years ago.
Adds checking for hyphenated checksum, cited references.
django-11350.4.diff (6.9 KB) - added by Idan Gazit 6 years ago.
Adds more sensible docs.

Download all attachments as: .zip

Change History (23)

comment:1 Changed 7 years ago by anonymous

Needs documentation: unset
Needs tests: unset
Owner: changed from nobody to anonymous
Patch needs improvement: unset
Status: newassigned

comment:2 Changed 7 years ago by Yuval Adam

Owner: changed from anonymous to Yuval Adam
Status: assignednew

Changed 7 years ago by Yuval Adam

Attachment: forms.py added

Forms for Israel local flavor

comment:3 Changed 7 years ago by Yuval Adam

Resolution: fixed
Status: newclosed

comment:4 Changed 7 years ago by Alex Gaynor

Resolution: fixed
Status: closedreopened

A ticket isn't fixed because a patch is uploaded, it's fixed when the code goes into Django.

comment:5 Changed 7 years ago by Honza Král

Needs tests: set

Also please add some tests to the forms you included. That way everybody will know if their work broke your code and would be able to fix it.

comment:6 Changed 7 years ago by Russell Keith-Magee

milestone: 1.1

We are well past the feature deadline for v1.1. This will need to wait until the next development phase.

Changed 7 years ago by Yuval Adam

Attachment: il.py added

Added regression tests

comment:7 Changed 7 years ago by Alex Gaynor

Triage Stage: UnreviewedAccepted

comment:8 Changed 7 years ago by Jannis Leidel

Needs documentation: set
Needs tests: unset
Patch needs improvement: set

Please provide a proper diff of the changes and a little bit of documentation.

comment:9 Changed 7 years ago by Shai Berger

Cc: Shai Berger added

Changed 6 years ago by Yuval Adam

Attachment: 11350.diff added

Updated proper diff, with tests and docs

comment:10 Changed 6 years ago by Yuval Adam

Has patch: set
milestone: 1.3
Needs documentation: unset
Patch needs improvement: unset

Changed 6 years ago by Alex Gaynor

Attachment: django-11350.diff added

Converted tests to unittests.

comment:11 Changed 6 years ago by Alex Gaynor

Does anyone know where I can find a description of the Israeli ID specification, google yields nothing of use.

comment:12 Changed 6 years ago by Shai Berger

Google yields plenty of results when you search in Hebrew... by following them, I got to the Luhn Algorithm -- the standard "mod 10" variant; numbers are 8 digits + checksum (9 digits altogether).

comment:13 Changed 6 years ago by Jannis Leidel

FYI, there is a luhn function in django.utils.checksums that is used by at least one localflavor.

Changed 6 years ago by Alex Gaynor

Attachment: django-11350.2.diff added

Use the luhn function as suggested by jezdez.

comment:14 Changed 6 years ago by Idan Gazit

Relevant (hebrew) wikipedia entries: the ID number format: the ID number format,
the checksum algorithm.

Changed 6 years ago by Idan Gazit

Attachment: django-11350.3.diff added

Adds checking for hyphenated checksum, cited references.

Changed 6 years ago by Idan Gazit

Attachment: django-11350.4.diff added

Adds more sensible docs.

comment:15 Changed 6 years ago by Alex Gaynor

Resolution: fixed
Status: reopenedclosed

(In [14223]) Fixed #11350 -- added an Israeli localflavor. Thanks to Yuval and Idan Gazit for their work on the patch.

comment:16 Changed 5 years ago by Jacob

milestone: 1.3

Milestone 1.3 deleted

Note: See TracTickets for help on using tickets.
Back to Top