Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (
Help us improve Python packaging - Donate today!

Adds support for multiple currencies as a Django application.

Project Description

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.

Release History

This version
History Node


History Node


History Node


History Node


History Node


History Node


History Node


History Node


History Node


History Node


History Node


Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Hash SHA256 Hash Help Version File Type Upload Date
(12.8 kB) Copy SHA256 Hash SHA256
Source May 17, 2016

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting