#3919 closed (fixed)
Add DEIdentityCardNumberField to German localflavor
Reported by: | 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)
Change History (7)
by , 18 years ago
Attachment: | idcardnumber.diff added |
---|
comment:1 by , 18 years ago
Triage Stage: | Unreviewed → Ready for checkin |
---|
comment:2 by , 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 , 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 , 18 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:5 by , 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 , 18 years ago
Oh, you got me, I did the tests "manually" in the python shell. Mea culpa!
initial idcardnumber field