On Sun, 2007-04-01 at 12:03 +0200, Russell Cloran wrote:
[...]

> I'm going to contribute some of the South African localflavour that I
> have around. South African ID numbers can be checked with a Luhn
> checksum ("the mod10 algorithm"), and I was wondering how that can
> best be packaged. 
> 
> Should it just live in the forms.py for now?

Try this: create a django/utils/checksums.py file and put it in there.
It may be useful in more than just form validation (otherwise it could
go in newforms/utils.py). I suspect we might see some more weighted
checksums in the future, too (such as the Norwegian social security
number) and we can extract out the general algorithm into that file at
some point.

Regards,
Malcolm




--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to