Django-money

Latest version: v3.5.3

Safety actively analyzes 687881 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 5 of 12

0.15

--------------------

.. 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. :github-issue:`411` (:github-user:`washeck`)
- Remove support for calling ``float`` on ``Money`` instances. Use the ``amount`` attribute instead. (:github-user:`Stranger6667`)
- ``MinMoneyValidator`` and ``MaxMoneyValidator`` are not inherited from Django's ``MinValueValidator`` and ``MaxValueValidator`` anymore. :github-issue:`376`
- In model and non-model forms ``forms.MoneyField`` uses ``CURRENCY_DECIMAL_PLACES`` as the default value for ``decimal_places``. :github-issue:`434` (:github-user:`Stranger6667`, :github-user:`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. :github-issue:`480` (:github-user:`Stranger6667`, :github-user:`MrFus10n`)
- Add ``default_currency`` option for REST Framework field. :github-issue:`475` (:github-user:`butorov`)

**Fixed**

- Failing certificates checks when accessing 3rd party exchange rates backends.
Fixed by adding `certifi` to the dependencies list. :github-issue:`403` (:github-user:`Stranger6667`)
- Fixed model-level ``validators`` behavior in REST Framework. :github-issue:`376` (:github-user:`rapIsKal`, :github-user:`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. :github-issue:`490` (:github-user:`benjaoming`)

**Changed**

- Allow using patched ``django.core.serializers.python._get_model`` in serializers, which could be helpful for
migrations. (:github-user:`Formulka`, :github-user:`Stranger6667`)

0.14.4

----------------------

**Changed**

- Re-raise arbitrary exceptions in JSON deserializer as `DeserializationError`. (:github-user:`Stranger6667`)

**Fixed**

- Invalid Django 1.8 version check in ``djmoney.models.fields.MoneyField.value_to_string``. (:github-user:`Stranger6667`)
- InvalidOperation in ``djmoney.contrib.django_rest_framework.fields.MoneyField.get_value`` when amount is None and currency is not None. :github-issue:`458` (:github-user:`carvincarl`)

0.14.3

----------------------

**Fixed**

- ``djmoney.forms.widgets.MoneyWidget`` decompression on Django 2.1+. :github-issue:`443` (:github-user:`Stranger6667`)

0.14.2

----------------------

**Fixed**

- Validation of ``djmoney.forms.fields.MoneyField`` when ``disabled=True`` is passed to it. :github-issue:`439` (:github-user:`stinovlas`, :github-user:`Stranger6667`)

0.14.1

----------------------

**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). :github-issue:`425` (:github-user:`Stranger6667`, :github-user:`77cc33`)

**Fixed**

- Error was raised when trying to do a query with a `ModelWithNullableCurrency`. :github-issue:`427` (:github-user:`Woile`)

0.14

--------------------

**Added**

- Caching of exchange rates. :github-issue:`398` (:github-user:`Stranger6667`)
- Added support for nullable ``CurrencyField``. :github-issue:`260` (:github-user:`Stranger6667`)

**Fixed**

- Same currency conversion getting MissingRate exception :github-issue:`418` (:github-user:`humrochagf`)
- `TypeError` during templatetag usage inside a for loop on Django 2.0. :github-issue:`402` (:github-user:`f213`)

**Removed**

- Support for Python 3.3 :github-issue:`410` (:github-user:`benjaoming`)
- Deprecated ``choices`` argument from ``djmoney.forms.fields.MoneyField``. Use ``currency_choices`` instead. (:github-user:`Stranger6667`)

Page 5 of 12

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.