[patch] Luhn algorithm implementation should be added to Django
|Reported by:||__hawkeye__||Owned by:||__hawkeye__|
|Cc:||Triage Stage:||Ready for checkin|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
The Luhn algorithm is used for validating credit cards and numerous national ID numbers. Django should have a built-in implementation to enable localflavors to add functionality.
Factored out of #3961 to separate additions. Slight implementation details have been changed.
Re: discussion there, the Luhn algorithm works from right to left, so strings are used for processing. Quick (non-scientific) benchmarking shows this string-based method to be faster than other Python implementations available online.
Note: filed under 'internationalization', but arguments could be made for other categorizations.
Change History (8)
Changed 8 years ago by __hawkeye__
comment:1 Changed 8 years ago by __hawkeye__
- Needs documentation unset
- Needs tests unset
- Patch needs improvement unset
- Status changed from new to assigned
- Triage Stage changed from Unreviewed to Accepted
comment:2 Changed 8 years ago by adrian
- Resolution set to wontfix
- Status changed from assigned to closed
comment:4 Changed 8 years ago by __hawkeye__
- Resolution wontfix deleted
- Status changed from closed to reopened
comment:6 Changed 8 years ago by Fredrik Lundh <fredrik@…>
- Triage Stage changed from Accepted to Ready for checkin