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 9 of 12

0.9.0

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

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. (:github-user:`Stranger6667`)
- Support for ``in`` lookup. (:github-user:`Stranger6667`)
- Django REST Framework support. :github-issue:`179` (:github-user:`Stranger6667`)
- Django 1.10 support. :github-issue:`198` (:github-user:`Stranger6667`)
- Improved South support. (:github-user:`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. :github-issue:`199` (:github-user:`spookylukey`)
- Only make ``objects`` a MoneyManager instance automatically. :github-issue:`194` and :github-issue:`201` (:github-user:`inureyes`)

**Fixed**

- Fixed default currency value for nullable fields in forms. :github-issue:`138` (:github-user:`Stranger6667`)
- Fixed ``_has_changed`` deprecation warnings. :github-issue:`206` (:github-user:`Stranger6667`)
- Fixed ``get_or_create`` crash, when ``defaults`` is passed. :github-issue:`213` (:github-user:`Stranger6667`, :github-user:`spookylukey`)

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

.. code-block:: python

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

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

**Added**

- Support for serialization of ``MoneyPatched`` instances in migrations. (:github-user:`AlexRiina`)
- Improved django-money-rates support. :github-issue:`173` (:github-user:`Stranger6667`)
- Extended ``F`` expressions support. (:github-user:`Stranger6667`)
- Pre-commit hooks support. (:github-user:`benjaoming`)
- Isort integration. (:github-user:`Stranger6667`)
- Makefile for common commands. (:github-user:`Stranger6667`)
- Codecov.io integration. (:github-user:`Stranger6667`)
- Python 3.5 builds to tox.ini and travis.yml. (:github-user:`Stranger6667`)
- Django master support. (:github-user:`Stranger6667`)
- Python 3.2 compatibility. (:github-user:`Stranger6667`)

**Changed**

- Refactored test suite (:github-user:`Stranger6667`)

**Fixed**

- Fixed fields caching. :github-issue:`186` (:github-user:`Stranger6667`)
- Fixed m2m fields data loss on Django < 1.8. :github-issue:`184` (:github-user:`Stranger6667`)
- Fixed managers access via instances. :github-issue:`86` (:github-user:`Stranger6667`)
- Fixed currency handling behaviour. :github-issue:`172` (:github-user:`Stranger6667`)
- Many PEP8 & flake8 fixes. (:github-user:`benjaoming`)
- Fixed filtration with ``F`` expressions. :github-issue:`174` (:github-user:`Stranger6667`)
- Fixed querying on Django 1.8+. :github-issue:`166` (:github-user:`Stranger6667`)

0.7.6

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

**Added**

- Added correct paths for py.test discovery. (:github-user:`benjaoming`)
- Mention Django 1.9 in tox.ini. (:github-user:`benjaoming`)

**Fixed**

- Fix for ``get_or_create`` / ``create`` manager methods not respecting currency code. (:github-user:`toudi`)
- Fix unit tests. (:github-user:`toudi`)
- Fix for using ``MoneyField`` with ``F`` expressions when using Django >= 1.8. (:github-user:`toudi`)

0.7.5

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

**Fixed**

- Fallback to ``_meta.fields`` if ``_meta.get_fields`` raises ``AttributeError`` :github-issue:`149` (:github-user:`browniebroke`)
- pip instructions updated. (:github-user:`GheloAce`)

0.7.4

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

**Added**

- Support for Django 1.9 (:github-user:`kjagiello`)

**Fixed**

- Fixed loaddata. (:github-user:`jack-cvr`)
- Python 2.6 fixes. (:github-user:`jack-cvr`)
- Fixed currency choices ordering. (:github-user:`synotna`)

0.7.3

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

**Added**

- Sum different currencies. (:github-user:`dnmellen`)
- ``__eq__`` method. (:github-user:`benjaoming`)
- Comparison of different currencies. (:github-user:`benjaoming`)
- Default currency. (:github-user:`benjaoming`)

**Fixed**

- Fix using Choices for setting currency choices. (:github-user:`benjaoming`)
- Fix tests for Python 2.6. (:github-user:`plumdog`)

Page 9 of 12

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.