Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#3919 closed (fixed)

Add DEIdentityCardNumberField to German localflavor

Reported by: Jannis Leidel <jl@…> Owned by: Adrian Holovaty
Component: Contrib apps Version: master
Severity: Keywords: localflavor, l10n, de
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

Patch to add a DEIdentityCardNumberField class which checks the validity of a German identity card number.
Tests included.

Attachments (1)

idcardnumber.diff (4.6 KB) - added by Jannis Leidel <jl@…> 10 years ago.
initial idcardnumber field

Download all attachments as: .zip

Change History (7)

Changed 10 years ago by Jannis Leidel <jl@…>

Attachment: idcardnumber.diff added

initial idcardnumber field

comment:1 Changed 10 years ago by Simon G. <dev@…>

Triage Stage: UnreviewedReady for checkin

comment:2 Changed 10 years ago by Malcolm Tredinnick

The example numbers in the tests aren't numbers that are in use, as far as you know, right? I don't want to put numbers that correspond to real people into the source code.

comment:3 Changed 10 years ago by Jannis Leidel <jl@…>

Hehe no, the numbers in the tests were randomly generated with javascript at this site: http://www.personalausweis.tv/generator.htm
I tested it here with several real ID cards from colleagues and it did indeed work.

comment:4 Changed 10 years ago by Malcolm Tredinnick

Resolution: fixed
Status: newclosed

(In [4922]) Fixed #3919 -- Added German identity card number validation to German
localflavor. Thanks, Jannis Leidel.

comment:5 Changed 10 years ago by Malcolm Tredinnick

Jannis, I'm beginning to think you don't run your own tests. (I'm sure you do, but not in the format you submit the patch.)

For the second day in a row, you've patched the tests file outside the closing quotes on the docstring. So it's not Python syntax. You need to put the tests inside the triple-quoted string. The big clue is that when you run the tests, Python doesn't explode with a syntax error. :-)

comment:6 Changed 10 years ago by Jannis Leidel <jl@…>

Oh, you got me, I did the tests "manually" in the python shell. Mea culpa!

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