AFIP integration for django
Project description
django-afip
===========
**django-afip** is a django application for interacting with AFIP's
web-services (and models all related data). For the moment only WSFE and WSAA
are implemented.
.. image:: https://ci.gitlab.com/projects/7545/status.png?ref=master
:target: https://ci.gitlab.com/projects/7545?ref=master
:alt: build status
.. images:: https://img.shields.io/pypi/v/django-afip.svg
:target: https://pypi-hypernode.com/pypi/django-afip
:alt: version on pypi
.. images:: https://img.shields.io/pypi/l/django-afip.svg
:alt: licence
Instalation
-----------
First install the actual package::
pip install django-afip
And then configure your project to use it by adding it to settings.py::
INSTALLED_APPS = (
...
'django_afip',
...
)
If you want to use AFIP's testing servers, then you'll need to configure the
app to do so::
AFIP_DEBUG = True
Getting started
---------------
First of all, you'll need to create a taxpayer, and upload the related ssl key and
certificate (for authorization). django-afip includes admin views for every
model included, and it's the recomended way to create one.
Once you have created a taxpayer, you'll need its points of sales. This, again,
should be done via the admin by selecting "fetch points of sales'.
Finally, you'll need to pre-populate certain models with AFIP-defined data.
Rather than include fixtures which require updating over time, a special view
has been included for importing them from the WS with live data. Only a
superuser can activate this population. This view is idempotent, and running it
more than once will not create any duplicate data.
To access this view, add something like this to your views.py::
urlpatterns = [
...
url(r'^__afip__/', include('django_afip.urls')),
...
]
Then visit http://example.com/__afip__/populate_models. This will retrieve
Receipt Types, Document Types, and a few other data types from AFIP's WS.
Again, only a user with superuser priviledges may trigger this download.
You are now ready to start creating and validating receipts. While you may do
this via the admin as well, you probably want to do this programatically or via
some custom view.
Contributing
------------
Unit tests are run via ``tox``. Any code contributions must pass all tests. New
features must include corresponding unit tests. Any bugfixes must include tests
that fail without it, and pass with it.
Note that tests use AFIP's testing servers and a specific key that's know to
contain at least one point of sale.
Licence
-------
This software is distributed under the ISC licence. See LICENCE for details.
Copyright (c) 2015 Hugo Osvaldo Barrera <hugo@barrera.io>
===========
**django-afip** is a django application for interacting with AFIP's
web-services (and models all related data). For the moment only WSFE and WSAA
are implemented.
.. image:: https://ci.gitlab.com/projects/7545/status.png?ref=master
:target: https://ci.gitlab.com/projects/7545?ref=master
:alt: build status
.. images:: https://img.shields.io/pypi/v/django-afip.svg
:target: https://pypi-hypernode.com/pypi/django-afip
:alt: version on pypi
.. images:: https://img.shields.io/pypi/l/django-afip.svg
:alt: licence
Instalation
-----------
First install the actual package::
pip install django-afip
And then configure your project to use it by adding it to settings.py::
INSTALLED_APPS = (
...
'django_afip',
...
)
If you want to use AFIP's testing servers, then you'll need to configure the
app to do so::
AFIP_DEBUG = True
Getting started
---------------
First of all, you'll need to create a taxpayer, and upload the related ssl key and
certificate (for authorization). django-afip includes admin views for every
model included, and it's the recomended way to create one.
Once you have created a taxpayer, you'll need its points of sales. This, again,
should be done via the admin by selecting "fetch points of sales'.
Finally, you'll need to pre-populate certain models with AFIP-defined data.
Rather than include fixtures which require updating over time, a special view
has been included for importing them from the WS with live data. Only a
superuser can activate this population. This view is idempotent, and running it
more than once will not create any duplicate data.
To access this view, add something like this to your views.py::
urlpatterns = [
...
url(r'^__afip__/', include('django_afip.urls')),
...
]
Then visit http://example.com/__afip__/populate_models. This will retrieve
Receipt Types, Document Types, and a few other data types from AFIP's WS.
Again, only a user with superuser priviledges may trigger this download.
You are now ready to start creating and validating receipts. While you may do
this via the admin as well, you probably want to do this programatically or via
some custom view.
Contributing
------------
Unit tests are run via ``tox``. Any code contributions must pass all tests. New
features must include corresponding unit tests. Any bugfixes must include tests
that fail without it, and pass with it.
Note that tests use AFIP's testing servers and a specific key that's know to
contain at least one point of sale.
Licence
-------
This software is distributed under the ISC licence. See LICENCE for details.
Copyright (c) 2015 Hugo Osvaldo Barrera <hugo@barrera.io>
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
Close
Hashes for django_afip-1.1.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8575c84f5805c0c3a73dd146d210d9809065de0cc349ed7f55fa0fec2db1c689 |
|
MD5 | a341cdc746bb3d270acfcc19839e2521 |
|
BLAKE2b-256 | 6b90ffb40d5f00327f01383f2ba090eeedcf4a68450ce571c8f987dc65f34a90 |