f-strings everywhere
This commit is contained in:
parent
524fd0bc8c
commit
2ae740dd49
35 changed files with 227 additions and 245 deletions
|
|
@ -222,8 +222,8 @@ functions)::
|
|||
|
||||
@app.context_processor
|
||||
def utility_processor():
|
||||
def format_price(amount, currency=u'€'):
|
||||
return u'{0:.2f}{1}'.format(amount, currency)
|
||||
def format_price(amount, currency="€"):
|
||||
return f"{amount:.2f}{currency}"
|
||||
return dict(format_price=format_price)
|
||||
|
||||
The context processor above makes the `format_price` function available to all
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue