BNR exchange rates for django apps.
Project description
BNR exchange rates for django apps.
Installation
To get the latest stable release from PyPi
pip install django-bnr
To get the latest commit from GitHub
pip install -e git+git://github.com/PressLabs/django-bnr.git#egg=django_bnr
Add django_bnr to your INSTALLED_APPS
INSTALLED_APPS = (
...,
'django_bnr',
)
Don’t forget to migrate your database
./manage.py migrate django_bnr
Usage
The package provides a python function for getting BNR exchange rates.
from django_bnr.utils import get_bnr_rate
get_bnr_rate(date, currency)
It also provides a management command for getting the BNR rates. Running it daily in a cron ensures you have data cached since BNR offers rates for up to 15 days.
./manage.py get_bnr_rate -c CURRENCY -d DATE
Contribute
If you want to contribute to this project, please perform the following steps
# Fork this repository
# Clone your fork
mkvirtualenv -p python2.7 django-bnr
git co -b feature_branch master
# Implement your feature and tests
git add . && git commit
git push -u origin feature_branch
# Send us a pull request for your feature branch
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-bnr-0.4.tar.gz
(4.1 kB
view details)
File details
Details for the file django-bnr-0.4.tar.gz
.
File metadata
- Download URL: django-bnr-0.4.tar.gz
- Upload date:
- Size: 4.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: Python-urllib/3.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 97d00bcc58d13923cf3f0681ce910f3a8c925638eaeb200ecf495e0275edc48e |
|
MD5 | f353bdf7ce450923a844ffaadbb75e06 |
|
BLAKE2b-256 | d00952e5d101ae4de69b38e8a7be757b264a607dfbf9d6e70365ea7c992b635e |