Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#3919 closed (fixed)

Add DEIdentityCardNumberField to German localflavor

Reported by: Jannis Leidel <jl@…> Owned by: adrian
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:


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

Download all attachments as: .zip

Change History (7)

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

initial idcardnumber field

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

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Ready for checkin

comment:2 Changed 9 years ago by mtredinnick

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

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

comment:4 Changed 9 years ago by mtredinnick

  • Resolution set to fixed
  • Status changed from new to closed

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

comment:5 Changed 9 years ago by mtredinnick

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 9 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