skip to navigation
skip to content

django-currencies 0.4.0

Adds support for multiple currencies as a Django application.

Package Documentation

django-currencies allows you to define different currencies, and includes template tags/filters to allow easy conversion between them.

For more details, see the documentation at Read The Docs.

Authored by Panos Laganakos, and some great contributors.


  1. Either clone this repository into your project, or install with pip:

    pip install django-currencies
  2. You’ll need to add currencies to INSTALLED_APPS in your project’s settings file:

    import django
    if django.VERSION < (1, 7):
        INSTALLED_APPS += (
  3. Be sure you have the currencies.context_processors.currencies processor:

        'django.core.context_processors.request',  # must be enabled
  4. Update your file :

    urlpatterns += patterns('',
        url(r'^currencies/', include('currencies.urls')),

Then run ./ syncdb to create the required database tables

Please see example application. This application is used to manually test the functionalities of this package. This also serves as a good example.

You need Django 1.4 or above to run that. It might run on older versions but that is not tested.

Upgrading from 0.3.3

Upgrading from 0.3.3 is likely to cause problems trying to apply a migration when the tables already exist. In this case a fake migration needs to be applied:

./ migrate currencies 0001 --fake


django-currencies has built-in integration with

You will need to specify your API key in your settings file:

OPENEXCHANGERATES_APP_ID = "c2b2efcb306e075d9c2f2d0b614119ea"

You will then be able to use the management commands currencies and updatecurrencies. The former will import any currencies that are defined on You can selectively import currencies, for example bellow command will import USD and EUR currencies only:

./ currencies --import=USD --import=EUR

The updatecurrencies management command will update all your currencies against the rates returned by Any missing currency will be left untouched.


First of all, load the currency in every template where you want to use it:

{% load currency %}


{% change_currency [price] [currency_code] %}

for example:

{% change_currency product.price "USD" %}

<!-- or if you have the ``currencies.context_processors.currencies`` available -->
{% change_currency product.price CURRENCY.code %}

or use the filter:

{{ [price]|currency:[currency_code] }}

for example:

{{ product.price|currency:"USD" }}

or set the CURRENCY_CODE context variable with a POST to the included view:

{% url 'currencies_set_currency' [currency_code] %}


django-currencies is released under the BSD license.

File Type Py Version Uploaded on Size
django-currencies-0.4.0.tar.gz (md5) Source 2016-05-17 12KB