Django-money

Latest version: v3.5.2

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

Scan your dependencies

Page 4 of 12

1.2.1

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

**Fixed**

- Aggregation through a proxy model. :github-issue:`583` (:github-user:`tned73`)

1.2

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

**Fixed**

- Resulting Money object from arithmetics (add / sub / ...) inherits maximum decimal_places from arguments :github-issue:`522` (:github-user:`wearebasti`)
- ``DeprecationWarning`` related to the usage of ``cafile`` in ``urlopen``. :github-issue:`553` (:github-user:`Stranger6667`)

**Added**

- Django 3.1 support

1.1

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

**Fixed**

- Optimize money operations on MoneyField instances with the same currencies. :github-issue:`541` (:github-user:`horpto`)

**Added**

- Support for ``Money`` type in ``QuerySet.bulk_update()`` :github-issue:`534` (:github-user:`satels`)

1.0

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

**Added**

- Support for money descriptor customization. (:github-user:`Stranger6667`)
- Fix ``order_by()`` not returning money-compatible queryset :github-issue:`519` (:github-user:`lieryan`)
- Django 3.0 support

**Removed**

- Support for Django 1.8 & 2.0. (:github-user:`Stranger6667`)
- Support for Python 2.7. :github-issue:`515` (:github-user:`benjaoming`)
- Support for Python 3.4. (:github-user:`Stranger6667`)
- ``MoneyPatched``, use ``djmoney.money.Money`` instead. (:github-user:`Stranger6667`)

**Fixed**

- Support instances with ``decimal_places=0`` :github-issue:`509` (:github-user:`fara`)

0.15.1

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

**Fixed**

- Respect field ``decimal_places`` when instantiating ``Money`` object from field db values. :github-issue:`501` (:github-user:`astutejoe`)
- Restored linting in CI tests (:github-user:`benjaoming`)

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`)

Page 4 of 12

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.