Opened 18 years ago

Closed 18 years ago

Last modified 18 years ago

#3919 closed (fixed)

Add DEIdentityCardNumberField to German localflavor

Reported by: Jannis Leidel <jl@…> Owned by: Adrian Holovaty
Component: Contrib apps Version: dev
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: no UI/UX: no

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@…> 18 years ago.
initial idcardnumber field

Download all attachments as: .zip

Change History (7)

by Jannis Leidel <jl@…>, 18 years ago

Attachment: idcardnumber.diff added

initial idcardnumber field

comment:1 by Simon G. <dev@…>, 18 years ago

Triage Stage: UnreviewedReady for checkin

comment:2 by Malcolm Tredinnick, 18 years ago

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 by Jannis Leidel <jl@…>, 18 years ago

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 by Malcolm Tredinnick, 18 years ago

Resolution: fixed
Status: newclosed

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

comment:5 by Malcolm Tredinnick, 18 years ago

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 by Jannis Leidel <jl@…>, 18 years ago

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