Skip to main content

European VIES VAT field for Django

Project description

https://img.shields.io/pypi/v/django-vies.svg Iontinuous Integration Code Health Test Coverage https://scrutinizer-ci.com/g/codingjoe/django-vies/badges/quality-score.png?b=master MIT License Join the chat at https://gitter.im/codingjoe/django-vies

Django-VIES

Django-VIES is a django extension that allows storing VAT Information Exchange System (VIES) data in django models and validation. Provided are a VATIN object, a ModelField and a FormField.

Installation

Current Stable

pip install django-vies

Latest Development

pip install -e git://github.com/codingjoe/django-vies.git#egg=django-vies

Usage

VATINField for models

from vies.models import VATINField


class Company(models.Model):
    name = models.CharField(max_length=100)
    vat = VATINField(blank=True, null=True)

VATIN wrapper class, allows access to result.

>>> from vies import VATIN
>>> vat = VATIN('NL', '124851903B01')
>>> vat.is_valid()
True
>>> vat.result
(reply){
   countryCode = "NL"
   vatNumber = "124851903B01"
   requestDate = 2014-03-25
   valid = True
   name = "JIETER"
   address = "(...)"
 }

Translations

Feel free to contribute translations, it’s simple!

` cd vies django-admin makemessages -l $YOUR_COUNTRY_CODE `

Just edit the generated PO file. Pull-Requests are welcome!

License

The MIT License (MIT)

Copyright (c) 2014 Johannes Hoppe

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django-vies-2.2.2.tar.gz (7.6 kB view details)

Uploaded Source

File details

Details for the file django-vies-2.2.2.tar.gz.

File metadata

  • Download URL: django-vies-2.2.2.tar.gz
  • Upload date:
  • Size: 7.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for django-vies-2.2.2.tar.gz
Algorithm Hash digest
SHA256 f21d5da930013f1aed0ed5eb05f51b94e141cc54d9d6dfd503950f9a23994cac
MD5 b9b88f11558287ef22dd02ba9e14ca94
BLAKE2b-256 51d3c6583e562066115562e5caed359fb098baad0177369a63c799b5ca11eff0

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page