diff --git a/hobo/templatetags/hobo.py b/hobo/templatetags/hobo.py index 6521251..64504fc 100644 --- a/hobo/templatetags/hobo.py +++ b/hobo/templatetags/hobo.py @@ -57,7 +57,8 @@ def as_numeral_currency(number): if not number: return '' try: - return num2words(unlazy(number), lang=get_language(), to='currency') + # workaround newer num2words always specifiying cents + return num2words(unlazy(number), lang=get_language(), to='currency').removesuffix(' et zéro centimes') except (TypeError, ValueError, decimal.InvalidOperation): return '' diff --git a/setup.py b/setup.py index 6deb7e3..bf66630 100644 --- a/setup.py +++ b/setup.py @@ -156,7 +156,7 @@ setup( 'djangorestframework>=3.12, <3.15', 'dnspython', 'lxml', - 'num2words==0.5.9', + 'num2words>=0.5.9', 'sorl-thumbnail', 'Pillow', ],