Django

Code

Ticket #3919 (closed: fixed)

Opened 1 year ago

Last modified 1 year ago

Add DEIdentityCardNumberField to German localflavor

Reported by: Jannis Leidel <jl@websushi.org> Assigned to: adrian
Milestone: Component: Contrib apps
Version: SVN Keywords: localflavor, l10n, de
Cc: Triage Stage: Ready for checkin
Has patch: 1 Needs documentation: 0
Needs tests: 0 Patch needs improvement: 0

Description

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

Attachments

idcardnumber.diff (4.6 kB) - added by Jannis Leidel <jl@websushi.org> on 04/04/07 04:33:13.
initial idcardnumber field

Change History

04/04/07 04:33:13 changed by Jannis Leidel <jl@websushi.org>

  • attachment idcardnumber.diff added.

initial idcardnumber field

04/04/07 05:41:10 changed by Simon G. <dev@simon.net.nz>

  • needs_better_patch changed.
  • stage changed from Unreviewed to Ready for checkin.
  • needs_tests changed.
  • needs_docs changed.

04/04/07 06:14:28 changed 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.

04/04/07 06:28:58 changed by Jannis Leidel <jl@websushi.org>

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.

04/04/07 06:40:09 changed by mtredinnick

  • status changed from new to closed.
  • resolution set to fixed.

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

04/04/07 06:42:07 changed 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. :-)

04/04/07 07:14:42 changed by Jannis Leidel <jl@websushi.org>

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


Add/Change #3919 (Add DEIdentityCardNumberField to German localflavor)




Change Properties
Action