Changelog

Unreleased (TBA)

Fixed

  • (add changelog entry)

Changed

  • (add changelog entry)

Added

  • (add changelog entry)

3.4.1 - 2023-11-30

Fixed

  • The default setting for CURRENCY_CHOICES excluded the currency choice defined by DEFAULT_CURRENCY. #739 (@Naggafin:github.com)

3.4 - 2023-10-17

Note

If you are using Django REST Framework or any other mechanism that relies on a custom serializer, please note that you now manually have to register the serializer. See this code snippet.

Changed

  • Don’t register Django Money serializers by default, instead the user should actively register a serializer in the settings.py #636 (@emorozov:github.com)

3.3 - 2023-09-10

Fixed

  • Fix detection of necessary migrations. Note that this means that previously undetected migrations will be detected as of this version #725 (@vanschelven:github.com)

3.2 - 2023-07-03

Changed

  • Explicitly define id in djmoney.contrib.exchange.Rate model - This ensures that the database table will use AutoField even if DEFAULT_AUTO_FIELD is set to BigAutoField in the Django project’s settings #716

Fixed

  • Downgrade asgiref to 3.6 to work with pypy3

3.1 - 2023-04-20

Added

Fixed

3.0 - 2022-06-20

Changed - Update py-moneyed to 2.0. #638 (@antonagestam:github.com, @flaeppe:github.com, @paoloxnet:github.com) - Remove the deprecated Money.decimal_places_display property and argument. #638 (@antonagestam:github.com, @flaeppe:github.com, @paoloxnet:github.com) - Remove the deprecated CURRENCY_DECIMAL_PLACES_DISPLAY setting. #638 (@antonagestam:github.com, @flaeppe:github.com, @paoloxnet:github.com) - Null constraint on an implicit CurrencyField is now declared from null=... argument to MoneyField. #638 (@antonagestam:github.com, @flaeppe:github.com, @paoloxnet:github.com)

Fixed

Added

  • Add support for Django 4.0 and 4.1.

  • Add support for Python 3.10.

Removed

  • Drop support for Django 3.1.

  • Drop support for Python 3.6.

2.1.1 - 2022-01-02

Changed

Fixed

2.1 - 2021-09-17

Added

Removed

2.0.3 - 2021-09-04

Fixed

  • Inconsistent Money._copy_attributes behaviour when non-Money instances are involved. #630 (@tned73:github.com)

2.0.2 - 2021-09-04

Fixed

2.0.1 - 2021-07-09

Fixed

2.0 - 2021-05-23

Added

  • New setting CURRENCY_CODE_MAX_LENGTH configures default max_length for MoneyField and exchange app models.

Changed

  • BREAKING: Update py-moneyed to >=1.2,<2. It uses babel to format Money, which formats it differently than py-moneyed<1. #567 (@antonagestam:github.com)

Deprecated

  • Money.decimal_places_display will be removed in django-money 3.0.

  • CURRENCY_DECIMAL_PLACES_DISPLAY will be removed in django-money 3.0.

1.3.1 - 2021-02-04

Fixed

  • Do not mutate the input moneyed.Money class to djmoney.money.Money in MoneyField.default and F-expressions. #603 (@moser:github.com)

1.3 - 2021-01-10

Added

  • Improved localization: New setting CURRENCY_DECIMAL_PLACES_DISPLAY configures decimal places to display for each configured currency. #521 (@wearebasti:github.com)

Changed

  • Set the default value for models.fields.MoneyField to NOT_PROVIDED. (@tned73:github.com)

Fixed

1.2.2 - 2020-12-29

Fixed

1.2.1 - 2020-11-29

Fixed

1.2 - 2020-11-26

Fixed

Added

  • Django 3.1 support

1.1 - 2020-04-06

Fixed

Added

1.0 - 2019-11-08

Added

Removed

Fixed

0.15.1 - 2019-06-22

Fixed

0.15 - 2019-05-30

Warning

This release contains backwards incompatibility, please read the release notes below.

Backwards incompatible changes

  • Remove implicit default value on non-nullable MoneyFields. Backwards incompatible change: set explicit default=0.0 to keep previous behavior. #411 (@washeck:github.com)

  • Remove support for calling float on Money instances. Use the amount attribute instead. (@Stranger6667:github.com)

  • MinMoneyValidator and MaxMoneyValidator are not inherited from Django’s MinValueValidator and MaxValueValidator anymore. #376

  • In model and non-model forms forms.MoneyField uses CURRENCY_DECIMAL_PLACES as the default value for decimal_places. #434 (@Stranger6667:github.com, @andytwoods:github.com)

Added

  • Add Money.decimal_places for per-instance configuration of decimal places in the string representation.

  • Support for customization of CurrencyField length. Some cryptocurrencies could have codes longer than three characters. #480 (@Stranger6667:github.com, @MrFus10n:github.com)

  • Add default_currency option for REST Framework field. #475 (@butorov:github.com)

Fixed

Changed

0.14.4 - 2019-01-07

Changed

Fixed

  • Invalid Django 1.8 version check in djmoney.models.fields.MoneyField.value_to_string. (@Stranger6667:github.com)

  • InvalidOperation in djmoney.contrib.django_rest_framework.fields.MoneyField.get_value when amount is None and currency is not None. #458 (@carvincarl:github.com)

0.14.3 - 2018-08-14

Fixed

0.14.2 - 2018-07-23

Fixed

0.14.1 - 2018-07-17

Added

  • Support for indirect rates conversion through maximum 1 extra step (when there is no direct conversion rate: converting by means of a third currency for which both source and target currency have conversion rates). #425 (@Stranger6667:github.com, @77cc33:github.com)

Fixed

0.14 - 2018-06-09

Added

Fixed

Removed

0.13.5 - 2018-05-19

Fixed

0.13.4 - 2018-05-19

Fixed

0.13.3 - 2018-05-12

Added

0.13.2 - 2018-04-16

Added

Fixed

0.13.1 - 2018-04-07

Fixed

0.13 - 2018-04-07

Added

Removed

Migration from django-money-rates

The new application is a drop-in replacement for django-money-rates. To migrate from django-money-rates:

  • In INSTALLED_APPS replace djmoney_rates with djmoney.contrib.exchange

  • Set OPEN_EXCHANGE_RATES_APP_ID setting with your app id

  • Run python manage.py migrate

  • Run python manage.py update_rates

For more information, look at Working with Exchange Rates section in README.

0.12.3 - 2017-12-13

Fixed

0.12.2 - 2017-12-12

Fixed

Changed

0.12.1 - 2017-11-20

Fixed

0.12 - 2017-10-22

Added

Changed

  • Improved Money support. Now django-money fully relies on pymoneyed localization everywhere, including Django admin. #276 (@Stranger6667:github.com)

  • Implement __html__ method. If used in Django templates, an Money object’s amount and currency are now separated with non-breaking space (&nbsp;) #337 (@jonashaag:github.com)

Deprecated

  • djmoney.models.fields.MoneyPatched and moneyed.Money are deprecated. Use djmoney.money.Money instead.

Fixed

Removed

0.11.4 - 2017-06-26

Fixed

0.11.3 - 2017-06-19

Fixed

0.11.2 - 2017-05-31

Fixed

0.11.1 - 2017-05-26

Fixed

Removed

0.11 - 2017-05-19

Added

Fixed

0.10.2 - 2017-02-18

Added

Fixed

0.10.1 - 2016-12-26

Fixed

0.10 - 2016-12-19

Changed

Fixed

0.9.1 - 2016-08-01

Fixed

  • Fixed packaging.

0.9.0 - 2016-07-31

NB! If you are using custom model managers not named objects and you expect them to still work, please read below.

Added

Changed

  • Changed auto conversion of currencies using djmoney_rates (added in 0.7.3) to be off by default. You must now add AUTO_CONVERT_MONEY = True in your settings.py if you want this feature. #199 (@spookylukey:github.com)

  • Only make objects a MoneyManager instance automatically. #194 and #201 (@inureyes:github.com)

Fixed

Note about automatic model manager patches

In 0.8, Django-money automatically patches every model managers with MoneyManager. This causes migration problems if two or more managers are used in the same model.

As a side effect, other managers are also finally wrapped with MoneyManager. This effect leads Django migration to point to fields with other managers to MoneyManager, and raises ValueError (MoneyManager only exists as a return of money_manager, not a class-form. However migration procedure tries to find MoneyManager to patch other managers.)

From 0.9, Django-money only patches objects with MoneyManager by default (as documented). To patch other managers (e.g. custom managers), patch them by wrapping with money_manager.

from djmoney.models.managers import money_manager


class BankAccount(models.Model):
    balance = MoneyField(max_digits=10, decimal_places=2, default_currency='USD')
    accounts = money_manager(MyCustomManager())

0.8 - 2016-04-23

Added

Changed

Fixed

0.7.6 - 2016-01-08

Added

Fixed

0.7.5 - 2015-12-22

Fixed

0.7.4 - 2015-11-02

Added

Fixed

0.7.3 - 2015-10-16

Added

Fixed

0.7.2 - 2015-09-01

Fixed

0.7.1 - 2015-08-11

Fixed

0.7.0 - 2015-06-14

Added

0.6.0 - 2015-05-23

Added

Changed

Fixed

0.5.0 - 2014-12-15

Added

Fixed

0.4.2 - 2014-07-31

0.4.1 - 2013-11-28

0.4.0.0 - 2013-11-26

Added

  • Python 3 compatibility.

  • tox tests.

  • Format localization.

  • Template tag money_localize.

0.3.4 - 2013-11-25

0.3.3.2 - 2013-10-31

0.3.3.1 - 2013-10-01

0.3.3 - 2013-02-17

Added

Fixed

0.3.2 - 2012-11-30

Fixed

  • Fixed issues with display_for_field not detecting fields correctly. (@adambregenzer:github.com)

  • Added South ignore rule to avoid duplicate currency field when using the frozen ORM. (@rach:github.com)

  • Disallow override of objects manager if not setting it up with an instance. (@rach:github.com)

0.3.1 - 2012-10-11

Fixed

0.3 - 2012-09-30

Added

0.2 - 2012-04-10

  • Initial public release