django-currency-history


Namedjango-currency-history JSON
Version 0.2.9 PyPI version JSON
download
home_pagehttps://github.com/bitmazk/django-currency-history
SummaryA reusable Django app that tracks currency rates.
upload_time2017-12-01 23:14:28
maintainer
docs_urlNone
authorTobias Lorenz
requires_python
licenseThe MIT License
keywords django
VCS
bugtrack_url
requirements django django-libs simplejson requests beautifulsoup4
Travis-CI No Travis.
coveralls test coverage No coveralls.
            Django Currency History
=======================

A reusable Django app that tracks currency rates.

.. image:: https://raw.githubusercontent.com/bitmazk/django-currency-history/master/admin.png

Installation
------------

To get the latest stable release from PyPi

.. code-block:: bash

    pip install django-currency-history

To get the latest commit from GitHub

.. code-block:: bash

    pip install -e git+git://github.com/bitmazk/django-currency-history.git#egg=currency_history

TODO: Describe further installation steps (edit / remove the examples below):

Add ``currency_history`` to your ``INSTALLED_APPS``

.. code-block:: python

    INSTALLED_APPS = (
        ...,
        'currency_history',
    )

Before your tags/filters are available in your templates, load them by using

.. code-block:: html

	{% load currency_history_tags %}


Don't forget to migrate your database

.. code-block:: bash

    ./manage.py migrate currency_history


Usage
-----

First fill the database with currencies and add your desired rates.
By default you will have to track the history by yourself. Check the
management commands and settings for automated trackings.

Management Commands
-------------------

track_currency_rates
++++++++++++++++++++

Run this command to let external services like fixer.io or Yahoo track currency
rates.

    ./manage.py track_currency_rates

You might want to run it with a cron job.

Settings
--------

CURRENCY_SERVICE
++++++++++++++++

Default = None

By default no external service tracks your rate histories.
The following services are available:

* ``'fixer'``: https://fixer.io/
* ``'openexchangerates'``: https://openexchangerates.org/
* ``'yahoo'``: http://finance.yahoo.com/currency-converter/


OPENEXCHANGERATES_APP_ID
++++++++++++++++++++++++

Default = False

If you want to make use of the ``openexchangerates`` service, make sure to
register at https://openexchangerates.org/ and provide your App ID.


CURRENCY_EMAIL_REPORT
+++++++++++++++++++++

Default = False

Enable this settings to receive an email report every time the
``track_currency_rates`` command was called.


Template Tags
-------------

convert_currency
++++++++++++++++

Convert an amount from one currency to another using the latest history.

    {% load currency_history_tags %}
    {% convert_currency 2 'EUR' 'SGD' as converted_amount %}


Contribute
----------

If you want to contribute to this project, please perform the following steps

.. code-block:: bash

    # Fork this repository
    # Clone your fork
    mkvirtualenv -p python2.7 django-currency-history
    make develop

    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

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/bitmazk/django-currency-history",
    "name": "django-currency-history",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "django",
    "author": "Tobias Lorenz",
    "author_email": "tobias.lorenz@bitmazk.com",
    "download_url": "https://files.pythonhosted.org/packages/6a/39/5664167f7d6043feb1dad802b73807f7ceceecc70ea833a454111b7066d6/django-currency-history-0.2.9.tar.gz",
    "platform": "OS Independent",
    "description": "Django Currency History\n=======================\n\nA reusable Django app that tracks currency rates.\n\n.. image:: https://raw.githubusercontent.com/bitmazk/django-currency-history/master/admin.png\n\nInstallation\n------------\n\nTo get the latest stable release from PyPi\n\n.. code-block:: bash\n\n    pip install django-currency-history\n\nTo get the latest commit from GitHub\n\n.. code-block:: bash\n\n    pip install -e git+git://github.com/bitmazk/django-currency-history.git#egg=currency_history\n\nTODO: Describe further installation steps (edit / remove the examples below):\n\nAdd ``currency_history`` to your ``INSTALLED_APPS``\n\n.. code-block:: python\n\n    INSTALLED_APPS = (\n        ...,\n        'currency_history',\n    )\n\nBefore your tags/filters are available in your templates, load them by using\n\n.. code-block:: html\n\n\t{% load currency_history_tags %}\n\n\nDon't forget to migrate your database\n\n.. code-block:: bash\n\n    ./manage.py migrate currency_history\n\n\nUsage\n-----\n\nFirst fill the database with currencies and add your desired rates.\nBy default you will have to track the history by yourself. Check the\nmanagement commands and settings for automated trackings.\n\nManagement Commands\n-------------------\n\ntrack_currency_rates\n++++++++++++++++++++\n\nRun this command to let external services like fixer.io or Yahoo track currency\nrates.\n\n    ./manage.py track_currency_rates\n\nYou might want to run it with a cron job.\n\nSettings\n--------\n\nCURRENCY_SERVICE\n++++++++++++++++\n\nDefault = None\n\nBy default no external service tracks your rate histories.\nThe following services are available:\n\n* ``'fixer'``: https://fixer.io/\n* ``'openexchangerates'``: https://openexchangerates.org/\n* ``'yahoo'``: http://finance.yahoo.com/currency-converter/\n\n\nOPENEXCHANGERATES_APP_ID\n++++++++++++++++++++++++\n\nDefault = False\n\nIf you want to make use of the ``openexchangerates`` service, make sure to\nregister at https://openexchangerates.org/ and provide your App ID.\n\n\nCURRENCY_EMAIL_REPORT\n+++++++++++++++++++++\n\nDefault = False\n\nEnable this settings to receive an email report every time the\n``track_currency_rates`` command was called.\n\n\nTemplate Tags\n-------------\n\nconvert_currency\n++++++++++++++++\n\nConvert an amount from one currency to another using the latest history.\n\n    {% load currency_history_tags %}\n    {% convert_currency 2 'EUR' 'SGD' as converted_amount %}\n\n\nContribute\n----------\n\nIf you want to contribute to this project, please perform the following steps\n\n.. code-block:: bash\n\n    # Fork this repository\n    # Clone your fork\n    mkvirtualenv -p python2.7 django-currency-history\n    make develop\n\n    git co -b feature_branch master\n    # Implement your feature and tests\n    git add . && git commit\n    git push -u origin feature_branch\n    # Send us a pull request for your feature branch\n",
    "bugtrack_url": null,
    "license": "The MIT License",
    "summary": "A reusable Django app that tracks currency rates.\n",
    "version": "0.2.9",
    "split_keywords": [
        "django"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "md5": "7956c67152fecba3ec69d8a72714dc83",
                "sha256": "c09fbdfa560d62938135ed547b0c68edbef51adedabdf43fd0a2b2a8b2221cc2"
            },
            "downloads": -1,
            "filename": "django-currency-history-0.2.9.tar.gz",
            "has_sig": false,
            "md5_digest": "7956c67152fecba3ec69d8a72714dc83",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 14382,
            "upload_time": "2017-12-01T23:14:28",
            "upload_time_iso_8601": "2017-12-01T23:14:28.333239Z",
            "url": "https://files.pythonhosted.org/packages/6a/39/5664167f7d6043feb1dad802b73807f7ceceecc70ea833a454111b7066d6/django-currency-history-0.2.9.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2017-12-01 23:14:28",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "bitmazk",
    "github_project": "django-currency-history",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [
        {
            "name": "django",
            "specs": []
        },
        {
            "name": "django-libs",
            "specs": []
        },
        {
            "name": "simplejson",
            "specs": []
        },
        {
            "name": "requests",
            "specs": []
        },
        {
            "name": "beautifulsoup4",
            "specs": []
        }
    ],
    "test_requirements": [
        {
            "name": "coverage",
            "specs": []
        },
        {
            "name": "ipdb",
            "specs": []
        },
        {
            "name": "flake8",
            "specs": []
        },
        {
            "name": "fabric3",
            "specs": []
        },
        {
            "name": "paramiko",
            "specs": [
                [
                    "<",
                    "2.0.0"
                ]
            ]
        },
        {
            "name": "mixer",
            "specs": []
        },
        {
            "name": "mock",
            "specs": []
        },
        {
            "name": "tox",
            "specs": []
        }
    ],
    "tox": true,
    "lcname": "django-currency-history"
}
        
Elapsed time: 0.04274s