NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
PyPI · #4718 most downloaded on PyPI
Adds support for using money and currency fields in django models and forms. Uses py-moneyed as the money implementation.
Last release 3 months ago
07 Jun 2026
Ships fairly regularly
a new release about every 4 months
Nearly every release is documented
notes for 55 of the last 60 stable releases
Nothing withdrawn
no release was ever pulled
14 years old
77 releases · first in 2012
Changelog: https://django-money.readthedocs.io/en/latest/changes.html
Changelog: https://django-money.readthedocs.io/en/latest/changes.html
Added
UniRateBackend exchange-rate backend for UniRateAPI . Configure via EXCHANGE_BACKEND = "djmoney.contrib.exchange.backends.UniRateBackend" and set UNIRATE_ACCESS_KEY .
Changed
Upsert rates instead of deleting and recreating them #818 ( @2tunnels:github.com )
Update README to reflect currently supported Python (3.10–3.13) and Django (4.2–5.2) versions. #820 ( @smhtbtb:github.com )
Changelog: https://django-money.readthedocs.io/en/latest/changes.html
Changelog: https://django-money.readthedocs.io/en/latest/changes.html
One column per quarter.
Nothing published for this version
Nothing published for this version
Nothing published for this version
Full Changelog: https://django-money.readthedocs.io/en/latest/changes.html
Full Changelog: https://django-money.readthedocs.io/en/latest/changes.html
Added
Django 5.2 and Python 3.13 support #785 ( @gvangool:github.com and @browniebroke:github.com )
Added
Django 5.2 and Python 3.13 support 785 (gvangool and browniebroke)
Full Changelog: https://django-money.readthedocs.io/en/latest/changes.html
Full Changelog: https://django-money.readthedocs.io/en/latest/changes.html
Fixed
django-rest-framework: MoneyField does not work anymore with custom serializer fields #768 ( @apjama:github.com )
Added
Django 5.1 support #767 ( @benjaoming:github.com )
Fixed
django-rest-framework: MoneyField does not work anymore with custom serializer fields 768 (apjama)
Added
Django 5.1 support 767 (benjaoming)
Full Changelog: https://django-money.readthedocs.io/en/latest/changes.html
Full Changelog: https://django-money.readthedocs.io/en/latest/changes.html
Fixed
django-rest-framework: Fix regression from 3.5 #762 ( @dariusmazeika:github.com )
Fixed
django-rest-framework: Fix regression from 3.5 762 (dariusmazeika)
Full Changelog: https://django-money.readthedocs.io/en/latest/changes.html
Full Changelog: https://django-money.readthedocs.io/en/latest/changes.html
Fixed
django-rest-framework: Fix regression from 3.5 #757 ( @phillipuniverse:github.com )
Add base parameter to openexchangerates.org backend #751 ( @foarsitter:github.com )
Fixed
django-rest-framework: Fix regression from 3.5 757 (phillipuniverse)
Add base parameter to openexchangerates.org backend 751 (foarsitter)
Full Changelog: https://django-money.readthedocs.io/en/latest/changes.html
Full Changelog: https://django-money.readthedocs.io/en/latest/changes.html
Important
If you generated MoneyField migrations in the previous series 3.4.x, you may have to manually edit subsequent migrations. Please share your successful approaches in #731 .
Fixed
Revert 3.4 patch, meaning that auto-generated CurrencyField is once again part of migrations #731 ( @benjaoming:github.com )
django-rest-framework: MinMoneyValidator and MaxMoneyValidator fixed, may require default_currency defined #722 ( @hosamhamdy258:github.com @errietta:github.com @benjaoming:github.com )
Added
Django 5.0 support #753 ( @benjaoming:github.com )
Removed
Official support for Django 2.2, 3.2, 4.0, 4.1 #753 ( @benjaoming:github.com )
Important
If you generated MoneyField migrations in the previous series 3.4.x, you may have to manually edit subsequent migrations. Please share your successful approaches in 731.
Fixed
Revert 3.4 patch, meaning that auto-generated CurrencyField is once again part of migrations 731 (benjaoming)
django-rest-framework: MinMoneyValidator and MaxMoneyValidator fixed, may require default_currency defined 722 (hosamhamdy258 errietta benjaoming)
Added
Django 5.0 support 753 (benjaoming)
Removed
Official support for Django 2.2, 3.2, 4.0, 4.1 753 (benjaoming)
Full Changelog: https://django-money.readthedocs.io/en/latest/changes.html
Full Changelog: https://django-money.readthedocs.io/en/latest/changes.html
Fixed
The default setting for CURRENCY_CHOICES excluded the currency choice defined by DEFAULT_CURRENCY . #739 ( @Naggafin:github.com )
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Renamed master branch to main (@benjaoming)
Changed
Fixed
Changed
Renamed master branch to main ( @benjaoming:github.com )
Fixed
Make Django REST Framework integration always raise lower-level errors as ValidationError . #601 , #637 ( @flaeppe:github.com )
False positives in Migration changes, improvements to MoneyField.deconstruct . #646 , #648 ( @flaeppe:github.com )
Changed
Renamed master branch to main (benjaoming)
Fixed
Make Django REST Framework integration always raise lower-level errors as ValidationError. 601, 637 (flaeppe)
False positives in Migration changes, improvements to MoneyField.deconstruct. 646, 648 (flaeppe)
Add support for Django 3.2. #612
Added
Removed
Added
Add support for Django 3.2. #612 ( @antonagestam:github.com )
Removed
Drop support for Django 1.11, 2.1 and 3.0. #612 ( @antonagestam:github.com )
Drop support for Python 3.5. #612 ( @antonagestam:github.com )
Added
Add support for Django 3.2. 612 (antonagestam)
Removed
Drop support for Django 1.11, 2.1 and 3.0. 612 (antonagestam)
Drop support for Python 3.5. 612 (antonagestam)
Inconsistent Money._copy_attributes behaviour when non-Money instances are involved. #630 (@tned73)
Money._copy_attributes behaviour when non-Money instances are involved. #630 (@tned73)Fixed
Inconsistent Money._copy_attributes behaviour when non- Money instances are involved. #630 ( @tned73:github.com )
Inconsistent Money._copy_attributes behaviour. #629 @tned73
Money._copy_attributes behaviour. #629 @tned73Fixed
Inconsistent Money._copy_attributes behaviour. #629 ( @tned73:github.com )
Invalid deprecation warning behavior. #624 (@nerdoc)
Fixed
Invalid deprecation warning behavior. #624 ( @nerdoc:github.com )
New setting CURRENCY_CODE_MAX_LENGTH configures default max_length for MoneyField and exchange app models.
CURRENCY_CODE_MAX_LENGTH configures default max_length for MoneyField and exchange app models.py-moneyed to >=1.2,<2. It uses babel to format Money, which formats it differently than py-moneyed<1. #567 (@antonagestam)Money.decimal_places_display will be removed in django-money 3.0.CURRENCY_DECIMAL_PLACES_DISPLAY will be removed in django-money 3.0.Do not mutate the input moneyed.Money class to djmoney.money.Money in MoneyField.default and F-expressions. #603 (@moser)
moneyed.Money class to djmoney.money.Money in MoneyField.default and F-expressions. #603 (@moser)Improved localization: New setting CURRENCY_DECIMAL_PLACES_DISPLAY configures decimal places to display for each configured currency. #521 (@wearebast
CURRENCY_DECIMAL_PLACES_DISPLAY configures decimal places to display for each configured currency. #521 (@wearebasti)models.fields.MoneyField to NOT_PROVIDED. (@tned73)pymoneyed<1.0 as it changed the repr output of the Money class. (@Stranger6667)Money from moneyed.Money. Regression, introduced in 1.2. #593 (@Stranger6667)Money.decimal_places and Money.decimal_places_display values after some arithmetic operations. #595 (@Stranger6667)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
Pin pymoneyed<1.0 as it changed the repr output of the Money class. ( @Stranger6667:github.com )
Subtracting Money from moneyed.Money . Regression, introduced in 1.2 . #593 ( @Stranger6667:github.com )
Missing the right Money.decimal_places and Money.decimal_places_display values after some arithmetic operations. #595 ( @Stranger6667:github.com )
Added
Improved localization: New setting CURRENCY_DECIMAL_PLACES_DISPLAY configures decimal places to display for each configured currency. 521 (wearebasti)
Changed
Set the default value for models.fields.MoneyField to NOT_PROVIDED. (tned73)
Fixed
Pin pymoneyed<1.0 as it changed the repr output of the Money class. (Stranger6667)
Subtracting Money from moneyed.Money. Regression, introduced in 1.2. 593 (Stranger6667)
Missing the right Money.decimal_places and Money.decimal_places_display values after some arithmetic operations. 595 (Stranger6667)
Confusing "number-over-money" division behavior by backporting changes from py-moneyed. #586 @wearebasti
py-moneyed. #586 @wearebastiAttributeError when a Money instance is divided by Money. #585 @niklasbFixed
Confusing “number-over-money” division behavior by backporting changes from py-moneyed . #586 ( @wearebasti:github.com )
AttributeError when a Money instance is divided by Money . #585 ( @niklasb:github.com )
Fixed
Confusing "number-over-money" division behavior by backporting changes from py-moneyed. 586 (wearebasti)
AttributeError when a Money instance is divided by Money. 585 (niklasb)
Aggregation through a proxy model. #583 (@tned73)
DeprecationWarning related to the usage of cafile in urlopen. #553 @Stranger6667
DeprecationWarning related to the usage of cafile in urlopen. #553 @Stranger6667Fixed
Resulting Money object from arithmetics (add / sub / …) inherits maximum decimal_places from arguments #522 ( @wearebasti:github.com )
DeprecationWarning related to the usage of cafile in urlopen . #553 ( @Stranger6667:github.com )
Added
Django 3.1 support
Fixed
Resulting Money object from arithmetics (add / sub / ...) inherits maximum decimal_places from arguments 522 (wearebasti)
DeprecationWarning related to the usage of cafile in urlopen. 553 (Stranger6667)
Added
Django 3.1 support
Optimize money operations on MoneyField instances with the same currencies. #541 @horpto
MoneyField instances with the same currencies. #541 @horptoMoney type in QuerySet.bulk_update() #534 @satelsFixed
Optimize money operations on MoneyField instances with the same currencies. #541 ( @horpto:github.com )
Added
Support for Money type in QuerySet.bulk_update() #534 ( @satels:github.com )
Fixed
Optimize money operations on MoneyField instances with the same currencies. 541 (horpto)
Added
Support for Money type in QuerySet.bulk_update() 534 (satels)
Support for money descriptor customization. (@Stranger6667)
Added
Support for money descriptor customization. ( @Stranger6667:github.com )
Fix order_by() not returning money-compatible queryset #519 ( @lieryan:github.com )
Django 3.0 support
Removed
Support for Django 1.8 & 2.0. ( @Stranger6667:github.com )
Support for Python 2.7. #515 ( @benjaoming:github.com )
Support for Python 3.4. ( @Stranger6667:github.com )
MoneyPatched , use djmoney.money.Money instead. ( @Stranger6667:github.com )
Fixed
Support instances with decimal_places=0 #509 ( @fara:github.com )
Added
Support for money descriptor customization. (Stranger6667)
Fix order_by() not returning money-compatible queryset 519 (lieryan)
Django 3.0 support
Removed
Support for Django 1.8 & 2.0. (Stranger6667)
Support for Python 2.7. 515 (benjaoming)
Support for Python 3.4. (Stranger6667)
MoneyPatched, use djmoney.money.Money instead. (Stranger6667)
Fixed
Support instances with decimal_places=0 509 (fara)
- Respect field decimal_places when instantiating Money object from field db values. #501 ( @astutejoe:github.com )
Fixed
Respect field decimal_places when instantiating Money object from field db values. #501 ( @astutejoe:github.com )
Restored linting in CI tests ( @benjaoming:github.com )
Fixed
Respect field decimal_places when instantiating Money object from field db values. 501 (astutejoe)
Restored linting in CI tests (benjaoming)
Change log: https://django-money.readthedocs.io/en/latest/changes.html
Change log: https://django-money.readthedocs.io/en/latest/changes.html
Warning
This release contains backwards incompatibility, please read the release notes below.
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
Failing certificates checks when accessing 3rd party exchange rates backends. Fixed by adding certifi to the dependencies list. #403 ( @Stranger6667:github.com )
Fixed model-level validators behavior in REST Framework. #376 ( @rapIsKal:github.com , @Stranger6667:github.com )
Setting keyword argument default_currency=None for MoneyField did not revert to settings.DEFAULT_CURRENCY and set str(None) as database value for currency. #490 ( @benjaoming:github.com )
Changed
Allow using patched django.core.serializers.python._get_model in serializers, which could be helpful for migrations. ( @Formulka:github.com , @Stranger6667:github.com )
Warning
This release contains backwards incompatibility, please read the release notes below.
Remove implicit default value on non-nullable MoneyFields. Backwards incompatible change: set explicit default=0.0 to keep previous behavior. 411 (washeck)
Remove support for calling float on Money instances. Use the amount attribute instead. (Stranger6667)
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, andytwoods)
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, MrFus10n)
Add default_currency option for REST Framework field. 475 (butorov)
Fixed
Failing certificates checks when accessing 3rd party exchange rates backends. Fixed by adding certifi to the dependencies list. 403 (Stranger6667)
Fixed model-level validators behavior in REST Framework. 376 (rapIsKal, Stranger6667)
Setting keyword argument default_currency=None for MoneyField did not revert to settings.DEFAULT_CURRENCY and set str(None) as database value for currency. 490 (benjaoming)
Changed
Allow using patched django.core.serializers.python._get_model in serializers, which could be helpful for migrations. (Formulka, Stranger6667)
Change log: https://django-money.readthedocs.io/en/latest/changes.html
Change log: https://django-money.readthedocs.io/en/latest/changes.html
Changed
Re-raise arbitrary exceptions in JSON deserializer as DeserializationError . ( @Stranger6667:github.com )
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 )
Changed
Re-raise arbitrary exceptions in JSON deserializer as DeserializationError. (Stranger6667)
Fixed
Invalid Django 1.8 version check in djmoney.models.fields.MoneyField.value_to_string. (Stranger6667)
InvalidOperation in djmoney.contrib.django_rest_framework.fields.MoneyField.get_value when amount is None and currency is not None. 458 (carvincarl)
djmoney.forms.widgets.MoneyWidget decompression on Django 2.1+. #443 (@Stranger6667 )
djmoney.forms.widgets.MoneyWidget decompression on Django 2.1+. #443 (@Stranger6667 )Fixed
djmoney.forms.widgets.MoneyWidget decompression on Django 2.1+. #443 ( @Stranger6667:github.com )
Validation of djmoney.forms.fields.MoneyField when disabled=True is passed to it. #439 (@stinovlas, @Stranger6667)
djmoney.forms.fields.MoneyField when disabled=True is passed to it. #439 (@stinovlas, @Stranger6667)Fixed
Validation of djmoney.forms.fields.MoneyField when disabled=True is passed to it. #439 ( @stinovlas:github.com , @Stranger6667:github.com )
Fixed
Validation of djmoney.forms.fields.MoneyField when disabled=True is passed to it. 439 (stinovlas, Stranger6667)
Support for indirect rates conversion through maximum 1 extra step (when there is no direct conversion rate: converting by means of a third currency f
ModelWithNullableCurrency. #427 (@Woile)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
Error was raised when trying to do a query with a ModelWithNullableCurrency . #427 ( @Woile:github.com )
Deprecated choices argument from djmoney.forms.fields.MoneyField. Use currency_choices instead. (@Stranger6667)
Added
Caching of exchange rates. #398 ( @Stranger6667:github.com )
Added support for nullable CurrencyField . #260 ( @Stranger6667:github.com )
Fixed
Same currency conversion getting MissingRate exception #418 ( @humrochagf:github.com )
TypeError during templatetag usage inside a for loop on Django 2.0. #402 ( @f213:github.com )
Removed
Support for Python 3.3 #410 ( @benjaoming:github.com )
Deprecated choices argument from djmoney.forms.fields.MoneyField . Use currency_choices instead. ( @Stranger6667:github.com )
Added
Caching of exchange rates. 398 (Stranger6667)
Added support for nullable CurrencyField. 260 (Stranger6667)
Fixed
Same currency conversion getting MissingRate exception 418 (humrochagf)
TypeError during templatetag usage inside a for loop on Django 2.0. 402 (f213)
Removed
Support for Python 3.3 410 (benjaoming)
Deprecated choices argument from djmoney.forms.fields.MoneyField. Use currency_choices instead. (Stranger6667)
Missing djmoney main package in dist #417
djmoney main package in dist #417Fixed
Missing in dist, djmoney/init.py . #417 ( @benjaoming:github.com )
Packaging of djmoney.contrib.exchange.management.commands. #412 @77cc33, @Stranger6667
djmoney.contrib.exchange.management.commands. #412 @77cc33, @Stranger6667Fixed
Packaging of djmoney.contrib.exchange.management.commands . #412 ( @77cc33:github.com , @Stranger6667:github.com )
Fixed
Packaging of djmoney.contrib.exchange.management.commands. 412 (77cc33, Stranger6667)
Rounding support via round built-in function on Python 3. #391 (@Stranger6667)
round built-in function on Python 3. #391 (@Stranger6667)Added
Rounding support via round built-in function on Python 3. ( @Stranger6667:github.com )
Django Admin integration for exchange rates. #392 (Stranger6667)
Added
Django Admin integration for exchange rates. #392 ( @Stranger6667:github.com )
Fixed
Exchange rates. TypeError when decoding JSON on Python 3.3-3.5. #399 ( @kcyeu:github.com )
Managers patching for models with custom Meta.default_manager_name . #400 ( @Stranger6667:github.com )
Regression: Could not run w/o django.contrib.exchange #388 (@Stranger6667)
django.contrib.exchange #388 (@Stranger6667)Fixed
Regression: Could not run w/o django.contrib.exchange #388 ( @Stranger6667:github.com )
Deprecated Money.__float__ which is implicitly called on some sum() operations #347. (@jonashaag)
Money.__float__ which is implicitly called on some sum() operations #347. (@jonashaag)See release notes about replacing django-money-rates here:
http://django-money.readthedocs.io/en/stable/changes.html
Added
Currency exchange #385 ( @Stranger6667:github.com )
Removed
Support for django-money-rates #385 ( @Stranger6667:github.com )
Deprecated Money.float which is implicitly called on some sum() operations #347 . ( @jonashaag:github.com )
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.
Added
Currency exchange 385 (Stranger6667)
Removed
Support for django-money-rates 385 (Stranger6667)
Deprecated Money.__float__ which is implicitly called on some sum() operations 347. (jonashaag)
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.
Fixed BaseMoneyValidator with falsy limit values. #371 (@1337)
Fixed
Fixed BaseMoneyValidator with falsy limit values. #371 ( @1337:github.com )
Django master branch compatibility. #361 (@Stranger6667)
Fixed
Django master branch compatibility. #361 ( @Stranger6667:github.com )
Fixed get_or_create for models with shared currency. #364 ( @Stranger6667:github.com )
Changed
Removed confusing rounding to integral value in Money.repr . #366 ( @Stranger6667:github.com , @evenicoulddoit:github.com )
Fixed
Django master branch compatibility. 361 (Stranger6667)
Fixed get_or_create for models with shared currency. 364 (Stranger6667)
Changed
Removed confusing rounding to integral value in Money.__repr__. 366 (Stranger6667, evenicoulddoit)
See also: http://django-money.readthedocs.io/en/stable/changes.html
See also: http://django-money.readthedocs.io/en/stable/changes.html
Fixed
Fixed migrations on SQLite. #139 , #338 ( @Stranger6667:github.com )
Fixed Field.rel.to usage for Django 2.0. #349 ( @richardowen:github.com )
Fixed Django REST Framework behaviour for serializers without *_currency field in serializer’s Meta.fields . #351 ( @elcolie:github.com , @Stranger6667:github.com )
Fixed
Fixed migrations on SQLite. 139, 338 (Stranger6667)
Fixed Field.rel.to usage for Django 2.0. 349 (richardowen)
Fixed Django REST Framework behaviour for serializers without *_currency field in serializer's Meta.fields. 351 (elcolie, Stranger6667)
djmoney.models.fields.MoneyPatched and moneyed.Money are deprecated. Use djmoney.money.Money instead.
See also: http://django-money.readthedocs.io/en/stable/changes.html
MoneyField. #308 (@Stranger6667)Money support. Now django-money fully relies on pymoneyed localization everywhere, including Django admin. #276 (@Stranger6667)__html__ method. If used in Django templates, an Money object's amount and currency are now separated with non-breaking space ( ). #337 (@jonashaag)djmoney.models.fields.MoneyPatched and moneyed.Money are deprecated. Use djmoney.money.Money instead.F expressions support for in lookups. #321 (@Stranger6667).Added
Ability to specify name for currency field. #195 ( @Stranger6667:github.com )
Validators for MoneyField . #308 ( @Stranger6667:github.com )
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 ( ) #337 ( @jonashaag:github.com )
Deprecated
djmoney.models.fields.MoneyPatched and moneyed.Money are deprecated. Use djmoney.money.Money instead.
Fixed
Fixed model field validation. #308 ( @Stranger6667:github.com ).
Fixed managers caching for Django >= 1.10. #318 ( @Stranger6667:github.com ).
Fixed F expressions support for in lookups. #321 ( @Stranger6667:github.com ).
Fixed money comprehension on querysets. #331 ( @Stranger6667:github.com , @jaavii1988:github.com ).
Fixed errors in Django Admin integration. #334 ( @Stranger6667:github.com , @adi-:github.com ).
Removed
Dropped support for Python 2.6 and 3.2. ( @Stranger6667:github.com )
Dropped support for Django 1.4, 1.5, 1.6, 1.7 and 1.9. ( @Stranger6667:github.com )
Added
Ability to specify name for currency field. 195 (Stranger6667)
Validators for MoneyField. 308 (Stranger6667)
Changed
Improved Money support. Now django-money fully relies on pymoneyed localization everywhere, including Django admin. 276 (Stranger6667)
Implement __html__ method. If used in Django templates, an Money object's amount and currency are now separated with non-breaking space ( ) 337 (jonashaag)
Deprecated
djmoney.models.fields.MoneyPatched and moneyed.Money are deprecated. Use djmoney.money.Money instead.
Fixed
Fixed model field validation. 308 (Stranger6667).
Fixed managers caching for Django >= 1.10. 318 (Stranger6667).
Fixed F expressions support for in lookups. 321 (Stranger6667).
Fixed money comprehension on querysets. 331 (Stranger6667, jaavii1988).
Fixed errors in Django Admin integration. 334 (Stranger6667, adi-).
Removed
Dropped support for Python 2.6 and 3.2. (Stranger6667)
Dropped support for Django 1.4, 1.5, 1.6, 1.7 and 1.9. (Stranger6667)
Fixed money parameters processing in update queries. #309
Fixed
Fixed money parameters processing in update queries. #309 ( @Stranger6667:github.com )
Fixed
Fixed money parameters processing in update queries. 309 (Stranger6667)
Restored support for Django 1.4, 1.5, 1.6, and 1.7 & Python 2.6 #304_ (@Stranger6667)
Fixed
Restored support for Django 1.4, 1.5, 1.6, and 1.7 & Python 2.6 #304 ( @Stranger6667:github.com )
Fixed field lookup regression. #300 (lmdsp, Stranger6667)
Fixed
Fixed field lookup regression. #300 ( @lmdsp:github.com , @Stranger6667:github.com )
Fixed access to models properties. #297
Fixed
Fixed access to models properties. #297 ( @mithrilstar:github.com , @Stranger6667:github.com )
Removed
Dropped support for Python 2.6. ( @Stranger6667:github.com )
Dropped support for Django < 1.8. ( @Stranger6667:github.com )
Fixed
Fixed access to models properties. 297 (mithrilstar, Stranger6667)
Removed
Dropped support for Python 2.6. (Stranger6667)
Dropped support for Django < 1.8. (Stranger6667)
Fixed AttributeError in get_or_create when the model have no default. #268 (Stranger6667, lobziik)
AttributeError in get_or_create when the model have no default. #268 (Stranger6667, lobziik)UnicodeEncodeError in string representation of MoneyPatched on Python 2. #272 (Stranger6667)CURRENCY_CHOICES settings option. #211 (Stranger6667, ChessSpider)in lookup. #278 (Stranger6667)py-moneyed. (Stranger6667)Added
An ability to set custom currency choices via CURRENCY_CHOICES settings option. #211 ( @Stranger6667:github.com , @ChessSpider:github.com )
Fixed
Fixed AttributeError in get_or_create when the model have no default. #268 ( @Stranger6667:github.com , @lobziik:github.com )
Fixed UnicodeEncodeError in string representation of MoneyPatched on Python 2. #272 ( @Stranger6667:github.com )
Fixed various displaying errors in Django Admin . #232 , #220 , #196 , #102 , #90 ( @Stranger6667:github.com , @arthurk:github.com , @mstarostik:github.com , @eriktelepovsky:github.com , @jplehmann:github.com , @graik:github.com , @benjaoming:github.com , @k8n:github.com , @yellow-sky:github.com )
Fixed non-Money values support for in lookup. #278 ( @Stranger6667:github.com )
Fixed available lookups with removing of needless lookup check. #277 ( @Stranger6667:github.com )
Fixed compatibility with py-moneyed . ( @Stranger6667:github.com )
Fixed ignored currency value in Django REST Framework integration. #292 ( @gonzalobf:github.com )
Fixed PendingDeprecationWarning during form initialization. #262 (Stranger6667, spookylukey)
ivanchenkodmitry)defaults keyword argument in get_or_create method. #257 (kjagiello)get_or_create method. #258 (Stranger6667)PendingDeprecationWarning during form initialization. #262 (Stranger6667, spookylukey)F expressions which involve non-Money fields. #265 (Stranger6667)Added
Added ability to configure decimal places output. #154 , #251 ( @ivanchenkodmitry:github.com )
Fixed
Fixed handling of defaults keyword argument in get_or_create method. #257 ( @kjagiello:github.com )
Fixed handling of currency fields lookups in get_or_create method. #258 ( @Stranger6667:github.com )
Fixed PendingDeprecationWarning during form initialization. #262 ( @Stranger6667:github.com , @spookylukey:github.com )
Fixed handling of F expressions which involve non-Money fields. #265 ( @Stranger6667:github.com )
Fixed default value for djmoney.forms.fields.MoneyField. #249 (tsouvarev)
Changes:
djmoney.forms.fields.MoneyField. #249 (tsouvarev)Fixed
Fixed default value for djmoney.forms.fields.MoneyField . #249 ( @tsouvarev:github.com )
Fixed
Fixed default value for djmoney.forms.fields.MoneyField. 249 (tsouvarev)
Fixed understands_money behaviour. Now it can be used as a decorator #215 (Stranger6667)
Changes in 0.10
Changed
Do not fail comparisons because of different currency. Just return False #225 ( @benjaoming:github.com and @ivirabyan:github.com )
Fixed
Fixed understands_money behaviour. Now it can be used as a decorator #215 ( @Stranger6667:github.com )
Fixed: Not possible to revert MoneyField currency back to default #221 ( @benjaoming:github.com )
Fixed invalid creation_counter handling. #235 ( @msgre:github.com and @Stranger6667:github.com )
Fixed broken field resolving. #241 ( @Stranger6667:github.com )
Fixed - Fixed packaging.
Fixed
Fixed packaging.
- Fixed _has_changed deprecation warnings. #206 ( @Stranger6667:github.com )
NB! If you are using custom model managers not named objects and you expect them to still work, please read below.
Added
Support for Value and Func expressions in queries. ( @Stranger6667:github.com )
Support for in lookup. ( @Stranger6667:github.com )
Django REST Framework support. #179 ( @Stranger6667:github.com )
Django 1.10 support. #198 ( @Stranger6667:github.com )
Improved South support. ( @Stranger6667:github.com )
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
Fixed default currency value for nullable fields in forms. #138 ( @Stranger6667:github.com )
Fixed _has_changed deprecation warnings. #206 ( @Stranger6667:github.com )
Fixed get_or_create crash, when defaults is passed. #213 ( @Stranger6667:github.com , @spookylukey:github.com )
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 ())
NB! If you are using custom model managers not named objects and you expect them to still work, please read below.
Added
Support for Value and Func expressions in queries. (Stranger6667)
Support for in lookup. (Stranger6667)
Django REST Framework support. 179 (Stranger6667)
Django 1.10 support. 198 (Stranger6667)
Improved South support. (Stranger6667)
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)
Only make objects a MoneyManager instance automatically. 194 and 201 (inureyes)
Fixed
Fixed default currency value for nullable fields in forms. 138 (Stranger6667)
Fixed _has_changed deprecation warnings. 206 (Stranger6667)
Fixed get_or_create crash, when defaults is passed. 213 (Stranger6667, spookylukey)
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())
- Support for serialization of MoneyPatched instances in migrations. ( @AlexRiina:github.com )
Added
Support for serialization of MoneyPatched instances in migrations. ( @AlexRiina:github.com )
Improved django-money-rates support. #173 ( @Stranger6667:github.com )
Extended F expressions support. ( @Stranger6667:github.com )
Pre-commit hooks support. ( @benjaoming:github.com )
Isort integration. ( @Stranger6667:github.com )
Makefile for common commands. ( @Stranger6667:github.com )
Codecov.io integration. ( @Stranger6667:github.com )
Python 3.5 builds to tox.ini and travis.yml. ( @Stranger6667:github.com )
Django master support. ( @Stranger6667:github.com )
Python 3.2 compatibility. ( @Stranger6667:github.com )
Changed
Refactored test suite ( @Stranger6667:github.com )
Fixed
Fixed fields caching. #186 ( @Stranger6667:github.com )
Fixed m2m fields data loss on Django < 1.8. #184 ( @Stranger6667:github.com )
Fixed managers access via instances. #86 ( @Stranger6667:github.com )
Fixed currency handling behaviour. #172 ( @Stranger6667:github.com )
Many PEP8 & flake8 fixes. ( @benjaoming:github.com )
Fixed filtration with F expressions. #174 ( @Stranger6667:github.com )
Fixed querying on Django 1.8+. #166 ( @Stranger6667:github.com )
Added
Support for serialization of MoneyPatched instances in migrations. (AlexRiina)
Improved django-money-rates support. 173 (Stranger6667)
Extended F expressions support. (Stranger6667)
Pre-commit hooks support. (benjaoming)
Isort integration. (Stranger6667)
Makefile for common commands. (Stranger6667)
Codecov.io integration. (Stranger6667)
Python 3.5 builds to tox.ini and travis.yml. (Stranger6667)
Django master support. (Stranger6667)
Python 3.2 compatibility. (Stranger6667)
Changed
Refactored test suite (Stranger6667)
Fixed
Fixed fields caching. 186 (Stranger6667)
Fixed m2m fields data loss on Django < 1.8. 184 (Stranger6667)
Fixed managers access via instances. 86 (Stranger6667)
Fixed currency handling behaviour. 172 (Stranger6667)
Many PEP8 & flake8 fixes. (benjaoming)
Fixed filtration with F expressions. 174 (Stranger6667)
Fixed querying on Django 1.8+. 166 (Stranger6667)
- Added correct paths for py.test discovery. ( @benjaoming:github.com )
Added
Added correct paths for py.test discovery. ( @benjaoming:github.com )
Mention Django 1.9 in tox.ini. ( @benjaoming:github.com )
Fixed
Fix for get_or_create / create manager methods not respecting currency code. ( @toudi:github.com )
Fix unit tests. ( @toudi:github.com )
Fix for using MoneyField with F expressions when using Django >= 1.8. ( @toudi:github.com )
Added
Added correct paths for py.test discovery. (benjaoming)
Mention Django 1.9 in tox.ini. (benjaoming)
Fixed
Fix for get_or_create / create manager methods not respecting currency code. (toudi)
Fix unit tests. (toudi)
Fix for using MoneyField with F expressions when using Django >= 1.8. (toudi)
- Fallback to _meta.fields if _meta.get_fields raises AttributeError #149 ( @browniebroke:github.com )
Fixed
Fallback to _meta.fields if _meta.get_fields raises AttributeError #149 ( @browniebroke:github.com )
pip instructions updated. ( @GheloAce:github.com )
Fixed
Fallback to _meta.fields if _meta.get_fields raises AttributeError 149 (browniebroke)
pip instructions updated. (GheloAce)
- Support for Django 1.9 ( @kjagiello:github.com )
Added
Support for Django 1.9 ( @kjagiello:github.com )
Fixed
Fixed loaddata. ( @jack-cvr:github.com )
Python 2.6 fixes. ( @jack-cvr:github.com )
Fixed currency choices ordering. ( @synotna:github.com )
Added
Support for Django 1.9 (kjagiello)
Fixed
Fixed loaddata. (jack-cvr)
Python 2.6 fixes. (jack-cvr)
Fixed currency choices ordering. (synotna)
Your coding agent can read these notes before it upgrades. Set up the MCP server →