currency, settings.yaml and default currency

This commit is contained in:
Emi Vasilek 2023-11-17 21:36:26 +01:00
parent 21e68445e7
commit 3d49bc044d
5 changed files with 72 additions and 13 deletions

View file

@ -1,5 +1,5 @@
{% macro price(price) -%}
{% if price == None %}?{%else%}{{price|round(1)|numprint}}{% endif %} CZK
{% if price != None and price is defined and price.price is defined %}{{price.price|round(1)|numprint}}{%else%}?{% endif %} {{price.currency}}
{%- endmacro %}
<!DOCTYPE html>
<html lang="en">

View file

@ -22,7 +22,7 @@
{% for ing in rec.ingredients %}
<li>{{ingredient(ing)}}</li>
{% endfor %}
{% if recipe.price != None %}price: {{price(rec.price)}}{%endif%}
{% if rec.price != None %}price: {{price(rec.price)}}{%endif%}
{% endif %}
{% if rec.steps|length != 0 %}
<h3>Steps</h3>