How to Solve NameError: name 'format_currency' is not defined -- babel

Solution: Import the 'format_currency' module

To Solve the error, add the following line to the top of your code.

from babel.numbers import format_currency

 

For more information:
Python babel format_currency