Skip to content

Commit

Permalink
fix: Use CURRENCY_CODE_MAX_LENGTH in MoneyField
Browse files Browse the repository at this point in the history
Ref: #617
  • Loading branch information
Stranger6667 committed May 18, 2021
1 parent 13577e1 commit 282c790
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion djmoney/models/fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ def __init__(
default=NOT_PROVIDED,
default_currency=DEFAULT_CURRENCY,
currency_choices=CURRENCY_CHOICES,
currency_max_length=3,
currency_max_length=CURRENCY_CODE_MAX_LENGTH,
currency_field_name=None,
money_descriptor_class=MoneyFieldProxy,
**kwargs
Expand Down
3 changes: 2 additions & 1 deletion docs/changes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@ Changelog

`Unreleased`_ - TBD
-------------------

**Added**

- New setting ``CURRENCY_CODE_MAX_LENGTH`` configures default max_length for MoneyField and ``exchage`` app models.
- New setting ``CURRENCY_CODE_MAX_LENGTH`` configures default max_length for MoneyField and ``exchange`` app models.

`1.3.1`_ - 2021-02-04
---------------------
Expand Down

0 comments on commit 282c790

Please sign in to comment.