Skip to content

Latest commit

 

History

History
252 lines (214 loc) · 10.7 KB

changes.rst

File metadata and controls

252 lines (214 loc) · 10.7 KB

Changelog

Changes in 0.10.2dev

Changes in 0.10.1

  • Fixed default value for djmoney.forms.fields.MoneyField. #249 (tsouvarev)

Changes in 0.10

Changes in 0.9.1

  • Fix packaging.

Changes in 0.9.0

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

Changes and new features

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

Changes in 0.8

Changes in 0.7.6

  • 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)
  • Mention Django 1.9 in tox.ini (benjaoming)
  • Added correct paths for py.test discovery (benjaoming)

Changes in 0.7.5

  • Fallback to _meta.fields if _meta.get_fields raises AttributeError #149 (browniebroke)
  • pip Instructions updated (GheloAce)

Changes in 0.7.4

Changes in 0.7.3

Changes in 0.7.2

  • Better checks on None values (tsouvarev, sjdines)
  • Consistency with South declarations and calling str function (sjdines)

Changes in 0.7

  • Django 1.8 compatibility (willhcr)
  • Fix bug in printing MoneyField (YAmikep)

Changes in 0.6

Changes in 0.5

  • Django 1.7 compatibility (w00kie)
  • Added choices= to instantiation of currency widget (davidstockwell)
  • Nullable MoneyField should act as default=None (jakewins)
  • Fixed bug where a non-required MoneyField threw an exception (spookylukey)

Changes in 0.4

  • Python 3 compatibility
  • Added tox tests
  • Added format localization
  • Added tag money_localize

Changes in 0.3.3

  • Fixed issues with money widget not passing attrs up to django's render method, caused id attribute to not be set in html for widgets (adambregenzer)
  • Fixed issue of default currency not being passed on to widget (snbuchholz)
  • Implemented the south_triple_field to add support for South migration (mattions)
  • Return the right default for South (mattions)
  • Django 1.5 compatibility fix (devlocal)

Changes in 0.3.2

  • Fixed issues with display_for_field not detecting fields correctly (adambregenzer)
  • Added South ignore rule to avoid duplicate currency field when using the frozen ORM (rach)
  • Disallow override of objects manager if not setting it up with an instance (rach)

Changes in 0.3.1

  • Fix AttributeError when Model inherit a manager (rach)
  • Correctly serialize the field (akumria)

Changes in 0.3

  • Allow django-money to be specified as read-only in a model (akumria)
  • South support: Declare default attribute values. (pjdelport)