{ "info": { "author": "Panos Laganakos", "author_email": "panos.laganakos@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Environment :: Web Environment", "Framework :: Django", "Framework :: Django :: 1.10", "Framework :: Django :: 1.11", "Framework :: Django :: 1.8", "Framework :: Django :: 1.9", "Framework :: Django :: 2.0", "Framework :: Django :: 2.1", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: Implementation :: PyPy", "Topic :: Internet :: WWW/HTTP", "Topic :: Internet :: WWW/HTTP :: Dynamic Content" ], "description": "django-currencies\n=================\n\n.. image:: https://travis-ci.org/panosl/django-currencies.svg?branch=master\n :target: https://travis-ci.org/panosl/django-currencies\n.. image:: https://codecov.io/gh/panosl/django-currencies/branch/master/graph/badge.svg\n :target: https://codecov.io/gh/panosl/django-currencies\n\n\ndjango-currencies allows you to define different currencies, and\nincludes template tags/filters to allow easy conversion between them.\n\nFor more details, see the `documentation `_ at Read The Docs.\n\nAuthored by `Panos Laganakos `_, and some great\n`contributors `_.\n\nInstallation\n------------\n\n1. Either clone this repository into your project, or install with ``pip``:\n\n .. code-block:: shell\n\n pip install django-currencies\n\n2. You'll need to add ``currencies`` to ``INSTALLED_APPS`` in your project's settings file:\n\n .. code-block:: python\n\n import django\n\n INSTALLED_APPS += (\n 'currencies',\n )\n\n if django.VERSION < (1, 7):\n INSTALLED_APPS += (\n 'south',\n )\n\n3a. Either have the ``currencies.context_processors.currencies`` processor:\n\n .. code-block:: python\n\n TEMPLATE_CONTEXT_PROCESSORS += (\n 'django.core.context_processors.request', # must be enabled\n 'currencies.context_processors.currencies',\n )\n\n3b. Or use the template tag ``currency_context``:\n\n .. code-block:: html+django\n\n {% load currency %}\n {% currency_context %}\n\n4. Update your ``urls.py`` file :\n\n .. code-block:: python\n\n urlpatterns += patterns('',\n url(r'^currencies/', include('currencies.urls')),\n )\n\nThen run ``./manage.py migrate`` to create the required database tables\n\nUpgrading from 0.3.3\n~~~~~~~~~~~~~~~~~~~~\n\nUpgrading from 0.3.3 is likely to cause problems trying to apply a\nmigration when the tables already exist. In this case a fake migration\nneeds to be applied:\n\n.. code-block:: shell\n\n ./manage.py migrate currencies 0001 --fake\n\nConfiguration\n-------------\n\ndjango-currencies has built-in integration with\n`openexchangerates.org `_,\n`Yahoo Finance `_ and\n`Currency ISO `_.\n\n**Management Commands**\n\nYou can use the management commands ``currencies`` and ``updatecurrencies``\nto maintain the currencies in the database. The former will import any\ncurrencies that are defined on the selected source into the database.\nThis includes information like the currency code, name, symbol, and any\nother info provided. The latter will update all the database currency\nrates from the source. Any currency missing on the source will be untouched.\n\nYou can selectively import currencies, for example the commands below\nwill import USD and EUR currencies only, or use a variable from the\nsettings that points to an iterable respectively:\n\n.. code-block:: shell\n\n ./manage.py currencies --import=USD --import=EUR\n ./manage.py currencies -i SHOP_CURRENCIES\n\nThe command automatically looks for variables CURRENCIES or SHOP_CURRENCIES\nin settings if ``-i`` is not specified.\nFor more information on the additional switches ``--force`` and ``--verbosity``\ntry ``./manage.py help currencies``.\n\n``updatecurrencies`` can automatically change the base rate of the imported\nexchange rates by specifying the ``--base`` switch like so:\n\n.. code-block:: shell\n\n ./manage.py updatecurrencies oxr --base=USD\n ./manage.py updatecurrencies yahoo -b SHOP_DEFAULT_CURRENCY\n\nThe command automatically looks for variables CURRENCIES_BASE or SHOP_DEFAULT_CURRENCY\nin settings if ``-b`` is not specified.\n\n**OpenExchangeRates**\n\nThis is the default source or select it specifically using ``oxr`` as\npositional argument to either command.\n\nYou will need to specify your API key in your settings file:\n\n.. code-block:: python\n\n OPENEXCHANGERATES_APP_ID = \"c2b2efcb306e075d9c2f2d0b614119ea\"\n\nRequirements: `requests `_\n(python3-compatible fork of `OpenExchangeRatesClient `_\nis integrated due to abandoned project)\n\n**Yahoo Finance**\n\n.. attention::\n\n Yahoo integration is now deprecated due to withdrawal of the service around 6 Feb 2018 due to purchase by Verizon.\n The cached currency json file will continue to be available through the ``currencies`` command however.\n\nSelect this source by specifying ``yahoo`` as positional argument.\n\nRequirements: `BeautifulSoup4 `_\nand `requests `_\n\n**Currency ISO**\n\nSelect this source by specifying ``iso`` as positional argument.\n\nRequirements: `requests `_\n\n=========== ========== ============= ========== ==========\nIntegration Live Feeds\n----------- -------------------------------------------------\n.. Currencies Rates Symbols Other Info\n=========== ========== ============= ========== ==========\n oxr |T| |T| |T| *\n yahoo |T| |ss| |T| |se| |T| |T|\n iso |T| |T|\n=========== ========== ============= ========== ==========\n\n.. |T| unicode:: U+2705 .. ticked\n.. |ss| raw:: html\n\n \n\n.. |se| raw:: html\n\n \n\n| \\* Symbols are imported from the file ``currencies.json`` because it is not supported by the service.\n| Other info includes ISO4217 number and exponent, country and city names, and alternative\n currency names.\n\nUsage\n-----\n\nFirst of all, load the ``currency`` in every template where you want to use it:\n\n.. code-block:: html+django\n\n {% load currency %}\n\nUse:\n\n.. code-block:: html+django\n\n {% change_currency [price] [currency_code] %}\n\nfor example:\n\n.. code-block:: html+django\n\n {% change_currency product.price \"USD\" %}\n\n \n {% change_currency product.price CURRENCY.code %}\n\nor use the filter:\n\n.. code-block:: html+django\n\n {{ [price]|currency:[currency_code] }}\n\nfor example:\n\n.. code-block:: html+django\n\n {{ product.price|currency:\"USD\" }}\n\nor set the ``CURRENCY_CODE`` context variable with a ``POST`` to the included view:\n\n.. code-block:: html+django\n\n {% url 'currencies_set_currency' [currency_code] %}\n\nor use the template tag ``currency_context``:\n\n.. code-block:: html+django\n\n {% currency_context %}\n\nwhich gives the three context variables: ``CURRENCIES``, ``CURRENCY_CODE`` and ``CURRENCY``.\n\n**Template**\n\nIncluded is a template for a Bootstrap 3 & fontawesome compatible navbar currency\nchooser. The navbar item will display if there are more than 1 active currencies.\nThere is a navbar parameter ``dropdown_extra_class`` which is used to supply extra classes\nto the dropdown:\n\n.. code-block:: html+django\n\n {% block navbar-nav %}\n ...\n
    \n ...\n {% with dropdown_extra_class=\"collapsed-nav\" %}\n {% include \"currencies/navbar/currency-chooser-bs3fa.html\" %}\n {% endwith %}\n\n.. attention::\n\n The currency choice may not be reflected on the navbar if your view is not re-rendered.\n This may be the case if you are viewing a default page in Django CMS for example.\n This is due to the context processor not being triggered because the RequestContext\n is not re-generated.\n\nLicense\n-------\n\n``django-currencies`` is released under the BSD license.\n\n\n", "description_content_type": "", "docs_url": "https://pythonhosted.org/django-currencies/", "download_url": "https://github.com/panosl/django-currencies/zipball/master", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/panosl/django-currencies", "keywords": "", "license": "BSD License", "maintainer": "", "maintainer_email": "", "name": "django-currencies", "package_url": "https://pypi.org/project/django-currencies/", "platform": "", "project_url": "https://pypi.org/project/django-currencies/", "project_urls": { "Download": "https://github.com/panosl/django-currencies/zipball/master", "Homepage": "https://github.com/panosl/django-currencies" }, "release_url": "https://pypi.org/project/django-currencies/0.9.0/", "requires_dist": [ "django (>=1.8)", "jsonfield (>=1.0.3)", "requests (>=2.14.2)", "bs4" ], "requires_python": "", "summary": "Adds support for multiple currencies as a Django application.", "version": "0.9.0" }, "last_serial": 4596700, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "683c57be98acf3b1bb7976d4ee454069", "sha256": "5f85d50e7007e3b4f26ff22be4fd366b6b585581243966b4261ffe5bec8db70d" }, "downloads": -1, "filename": "django-currencies-0.1.tar.gz", "has_sig": false, "md5_digest": "683c57be98acf3b1bb7976d4ee454069", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6950, "upload_time": "2009-06-13T17:28:39", "url": "https://files.pythonhosted.org/packages/1d/c2/7363d668a4f6abd51ecf80618f26d7df303e0d97fca0466a005f827b1bfd/django-currencies-0.1.tar.gz" } ], "0.2": [ { "comment_text": "", "digests": { "md5": "7f19a6b906b043a5c699530cee1882a9", "sha256": "856adbda883d6c4979974e0f1d797418c0a771bcec4becaa95f89e3e3d4706ad" }, "downloads": -1, "filename": "django-currencies-0.2.tar.gz", "has_sig": false, "md5_digest": "7f19a6b906b043a5c699530cee1882a9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6514, "upload_time": "2010-02-25T22:05:40", "url": "https://files.pythonhosted.org/packages/a1/8d/30cbba01c0afa7a0d8c20318317f726f0e78042e6d495ceab9af823589d1/django-currencies-0.2.tar.gz" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "088d61489abbc59464eee2e59ce62448", "sha256": "d0788d5454d71276b4d7cb1b50161b4af414126bca957da46e1005aa612d3210" }, "downloads": -1, "filename": "django-currencies-0.2.1.tar.gz", "has_sig": false, "md5_digest": "088d61489abbc59464eee2e59ce62448", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7216, "upload_time": "2010-02-28T19:38:01", "url": "https://files.pythonhosted.org/packages/11/82/f4a6d23d13fb699202a277d67b3e059587412a37f4cac48b89af696d23ad/django-currencies-0.2.1.tar.gz" } ], "0.2.2": [ { "comment_text": "", "digests": { "md5": "a0541a14d775ac2f669a3adc40d342c3", "sha256": "52d2c56e7c60409f7f986db75cc2e6b9dc77b8fc235c05dda401be6457a04b38" }, "downloads": -1, "filename": "django-currencies-0.2.2.tar.gz", "has_sig": false, "md5_digest": "a0541a14d775ac2f669a3adc40d342c3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11785, "upload_time": "2010-12-03T17:27:49", "url": "https://files.pythonhosted.org/packages/e5/16/2ca7a1649779cae64b0f82d7e2b8c2795f2ead0840e5fc41d96a869224d8/django-currencies-0.2.2.tar.gz" } ], "0.2.3": [ { "comment_text": "", "digests": { "md5": "6ee5448a21b3c387e9e292141bc7a977", "sha256": "1b2b0c91a01d01274d552f21963de99d374b214465667d6c6a1ec4e641b8468a" }, "downloads": -1, "filename": "django-currencies-0.2.3.tar.gz", "has_sig": false, "md5_digest": "6ee5448a21b3c387e9e292141bc7a977", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11775, "upload_time": "2010-12-12T17:41:23", "url": "https://files.pythonhosted.org/packages/69/34/633cb07c2c751ea492a63fdbd7a045f9a313156a47ca712b76579f798cda/django-currencies-0.2.3.tar.gz" } ], "0.2.4": [ { "comment_text": "", "digests": { "md5": "487659cefa715c65ebe1d9b4acde0dc7", "sha256": "71bd125367ca7e0c01abb896cfda1983e24e7a6c57ff78f34dd45d4596b5a026" }, "downloads": -1, "filename": "django-currencies-0.2.4.tar.gz", "has_sig": false, "md5_digest": "487659cefa715c65ebe1d9b4acde0dc7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12219, "upload_time": "2012-03-28T00:40:57", "url": "https://files.pythonhosted.org/packages/e8/b4/2cd7677bef0f9fa79accda05069f741134e2efac5ccddc4b42c7de9afab5/django-currencies-0.2.4.tar.gz" } ], "0.3.0": [ { "comment_text": "", "digests": { "md5": "845fd2704ee263bac2f5b70a4db28956", "sha256": "785a487aecc7564e1e329b73308265dfcab3e412ba6e42f901851d3dd176414d" }, "downloads": -1, "filename": "django-currencies-0.3.0.tar.gz", "has_sig": false, "md5_digest": "845fd2704ee263bac2f5b70a4db28956", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13369, "upload_time": "2012-10-19T16:42:35", "url": "https://files.pythonhosted.org/packages/6b/e1/1c4b73be962ef04276a7ff2b6526b1f482115bb5342273a1c2352f80caf6/django-currencies-0.3.0.tar.gz" } ], "0.3.1": [ { "comment_text": "", "digests": { "md5": "0cce560cda4be67d9a82d29f24603c57", "sha256": "146107bc5ac82e4c60f00bb462f423a42a94ee9535103c0302c31b67027f2800" }, "downloads": -1, "filename": "django-currencies-0.3.1.tar.gz", "has_sig": false, "md5_digest": "0cce560cda4be67d9a82d29f24603c57", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13592, "upload_time": "2012-10-31T13:15:38", "url": "https://files.pythonhosted.org/packages/bd/b6/941d5db902a8bb5f527f76619841ed1e0f9c6ef13391cc12b626fe8db882/django-currencies-0.3.1.tar.gz" } ], "0.3.2": [ { "comment_text": "", "digests": { "md5": "d3bda9965c7132603b304554eb37047b", "sha256": "38d80a53dc604bd456711ba0b8149d87ccc1ab4f3044a7142c6903c84107926a" }, "downloads": -1, "filename": "django-currencies-0.3.2.tar.gz", "has_sig": false, "md5_digest": "d3bda9965c7132603b304554eb37047b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15159, "upload_time": "2014-06-25T19:59:30", "url": "https://files.pythonhosted.org/packages/6f/fc/8efaebcd8eafca9f34ec7d4a60ef8f37a78d2b3174bdabff69a7b1ec0de7/django-currencies-0.3.2.tar.gz" } ], "0.3.3": [ { "comment_text": "", "digests": { "md5": "75a24cf2f7d722dc2b406318a4e6c26f", "sha256": "c7d86f07d0bcea9ef1c76e9728ee4cef33b377b5313fed202725a8d1511b6ead" }, "downloads": -1, "filename": "django-currencies-0.3.3.tar.gz", "has_sig": false, "md5_digest": "75a24cf2f7d722dc2b406318a4e6c26f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15221, "upload_time": "2014-10-18T08:15:29", "url": "https://files.pythonhosted.org/packages/7e/05/25b1d3ee0ca3425c813ba8ae66f3f1b1b4c1eb6fd25b9f2d6bd3f94483e6/django-currencies-0.3.3.tar.gz" } ], "0.4.0": [ { "comment_text": "", "digests": { "md5": "4fedabb54648d0562384d1fe2c03ce71", "sha256": "bbef9e16bbe195e40149bb9ef0b53aef970bf2c2c00e986df2be63d65f8551a0" }, "downloads": -1, "filename": "django-currencies-0.4.0.tar.gz", "has_sig": false, "md5_digest": "4fedabb54648d0562384d1fe2c03ce71", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12823, "upload_time": "2016-05-17T17:53:12", "url": "https://files.pythonhosted.org/packages/c7/89/8903bf3e979ff79adc6a6333e2375e82d265911a78b756d987945e3c0c98/django-currencies-0.4.0.tar.gz" } ], "0.9.0": [ { "comment_text": "", "digests": { "md5": "2ff98617ef4d43fcd8e106b61ba4a064", "sha256": "d8d6c950a926e3cc5126b60d9a4b2c772e10d68b7f0a2b66915aec1888bf7e8e" }, "downloads": -1, "filename": "django_currencies-0.9.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "2ff98617ef4d43fcd8e106b61ba4a064", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 50476, "upload_time": "2018-12-13T20:28:48", "url": "https://files.pythonhosted.org/packages/9f/9b/b53539b411d64c8fff8437c919663e055895bc537115e499a6d7623760ad/django_currencies-0.9.0-py2.py3-none-any.whl" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "2ff98617ef4d43fcd8e106b61ba4a064", "sha256": "d8d6c950a926e3cc5126b60d9a4b2c772e10d68b7f0a2b66915aec1888bf7e8e" }, "downloads": -1, "filename": "django_currencies-0.9.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "2ff98617ef4d43fcd8e106b61ba4a064", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 50476, "upload_time": "2018-12-13T20:28:48", "url": "https://files.pythonhosted.org/packages/9f/9b/b53539b411d64c8fff8437c919663e055895bc537115e499a6d7623760ad/django_currencies-0.9.0-py2.py3-none-any.whl" } ] }