{ "info": { "author": "Chedi Toueiti", "author_email": "chedi.toueiti@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Environment :: Web Environment", "Framework :: Django :: 1.8", "Intended Audience :: Developers", "License :: OSI Approved :: GNU General Public License v3 (GPLv3)", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.4" ], "description": "######################\ndjango-iban-field\n######################\n\nDjango iban field with validators and optional postgresql in base constraint checking. This is\nexpected to work with django 1.8 and later.\n\nInstallation\n=============\n\nInstall ``django-iban-field`` like you would install any other pypi package::\n\n pip install django-iban-field\n\n\nConfiguration and usage\n========================\n\n* add ``django_iban`` to the list of ``INSTALLED_APPS`` in your ``settings.py``\n* use in ``models.py``::\n\n from django_iban.fields import IBANField\n\n ...\n\n class MyModel(models.Model):\n iban = IBANField(enforce_database_constraint=True, unique=True)\n\nThe ``enable_databse_constraint`` option will add a function named is_valid_iban to your database and\nuse it the enforce the database type checking. This option will have an effect only if you are using\nthe postgreql backend and have the ``plpython`` extension enabled on your database.\n\n\nUtilities\n=========\n\nOther than the django field, you will find a generator class to use if you want to generate valid\nIBAN values::\n\n from django_iban.generator import IBANGenerator\n\n ....\n generator = IBANGenerator()\n # A complete random IBAN\n valid_iban = generator.generate()\n # But you can specify the country\n valid_iban = generator.generate(country_code='DE')\n # Or the bank and account\n valid_iban = generator.generate(country_code='DE', bank=XXXX, account=XXXX)\n\nYou cannot of course just pass the bank and the account without the country, and if you pass one\nor both of these values will then check for their validity, compute the checksum and return the\nvalid IBAN.\n\nYou may also be intereseted in the IBANSpecification class that contains all the format specification\nand the checksum facility::\n\n from django_iban.specification import IBANSpecification\n from django_iban.specification import IBAN_SPECIFICATION_CONFIG\n\n ....\n country_specification = IBAN_SPECIFICATION_CONFIG['TN']\n print(country_specification.bank_field_length)\n # 5\n print(country_specification.bank_regex)\n #[0-9]{2}[0-9]{3}\n print(country_specification.iban_regex)\n #[A-Z]{2}[0-9]{2}[0-9]{2}[0-9]{3}[0-9]{13}[0-9]{2}\n\n\nInspiration\n===========\n\nThis module take it's inspiration and some of the ideas from the `django-localflavor`_\nIBanField and the specification from `tom's cafe`_\n\nExample\n=======\n\nYou can find a running example of this field in this `demo django application`_, and if you are super lazy\nyou can just get my `vagrant bootstraper script` that will setup a full working vm using that project. You\njust have to have vagrant and openssl installed (tested on Fedora but should work with any other modern linux\nor mac)::\n\n curl https://raw.githubusercontent.com/Chedi/DjangoVagrantBootsraper/master/bootstrap.sh | bash\n\n\n.. _`demo django application`: https://github.com/Chedi/test_app\n.. _`tom's cafe`: http://toms-cafe.de/iban/iban.py\n.. _`django-localflavor`: http://django-localflavor.readthedocs.org/en/latest/", "description_content_type": null, "docs_url": null, "download_url": null, "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/Chedi/django-iban-field", "keywords": "django iban field", "license": "GNU General Public License v3 (GPLv3)", "maintainer": null, "maintainer_email": null, "name": "django-iban-field", "package_url": "https://pypi.org/project/django-iban-field/", "platform": "any", "project_url": "https://pypi.org/project/django-iban-field/", "project_urls": { "Homepage": "https://github.com/Chedi/django-iban-field" }, "release_url": "https://pypi.org/project/django-iban-field/0.8/", "requires_dist": null, "requires_python": null, "summary": "IBAN field for django with validation and optional postgresql in database constraint checking", "version": "0.8" }, "last_serial": 1605363, "releases": { "0.8": [ { "comment_text": "", "digests": { "md5": "d1f20893e00f834ea5b6451646d97ba5", "sha256": "9d11eacb49b939702aa169aa0a3c9880970ed087c236279c32c26f86c7e10092" }, "downloads": -1, "filename": "django_iban_field-0.8-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "d1f20893e00f834ea5b6451646d97ba5", "packagetype": "bdist_wheel", "python_version": "any", "requires_python": null, "size": 12855, "upload_time": "2015-06-24T20:20:49", "url": "https://files.pythonhosted.org/packages/d9/af/dc01e6f2ea4b2b282e01936ba70d18e215ea5527c1a58432b40251692429/django_iban_field-0.8-py2.py3-none-any.whl" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "d1f20893e00f834ea5b6451646d97ba5", "sha256": "9d11eacb49b939702aa169aa0a3c9880970ed087c236279c32c26f86c7e10092" }, "downloads": -1, "filename": "django_iban_field-0.8-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "d1f20893e00f834ea5b6451646d97ba5", "packagetype": "bdist_wheel", "python_version": "any", "requires_python": null, "size": 12855, "upload_time": "2015-06-24T20:20:49", "url": "https://files.pythonhosted.org/packages/d9/af/dc01e6f2ea4b2b282e01936ba70d18e215ea5527c1a58432b40251692429/django_iban_field-0.8-py2.py3-none-any.whl" } ] }