Some django batteries for dadata.ru services
Install django-dadata:
pip install -e git+https://github.com/okfish/django-dadata.git#egg=django-dadata
Then use it in a project:
# forms.py import dadata.widgets import DadataOrgWidget ... # form class definition name = CharField(widget=DadataOrgWidget('data-linked-fields': {'inn' : '#id_vatin', 'kpp' : '#id_reason_code'}, })) # form.html # do not forget to add widget's media <head> {{ form.media.js }} {{ form.media.css }} </head>
- Fields and validators (TODO)
- Widgets
- DadataOrgWidget uses dadata jquery suggestion plugin
- REST API helpers (TODO)
- cookiecutter
- cookiecutter-djangopackage