Welcome | Get started | Dive | Contribute | Topics | Reference | Changes | More
Adding IBAN numbers¶
This document describes the concepts implemented by the
lino_xl.lib.sepa
plugin.
This page contains code snippets (lines starting with >>>
), which are
being tested during our development workflow. The following
snippet initializes the demo project used throughout this page.
>>> from lino_book.projects.cosi1.startup import *
The following snippet tests whether all the fictuve IBAN samples are detected as valid by localflavor:
>>> from lino_xl.lib.sepa.fixtures.sample_ibans import IBANS
>>> from django.core.exceptions import ValidationError
>>> from localflavor.generic.validators import IBANValidator
>>> validate = IBANValidator()
>>> for i, iban in enumerate(IBANS):
... try:
... validate(iban)
... except ValidationError as e:
... print("{0}: {1} : {2}".format(i, iban, e))