Make import / export work with ruptures. Fixes #4

This commit is contained in:
Alexis M 2019-09-27 16:16:09 +02:00
parent 2e524c92c1
commit 931cc77f11
3 changed files with 4 additions and 2 deletions

2
.gitignore vendored
View file

@ -3,3 +3,5 @@ __pycache__
tmp/
db/
venv
.env
.vscode

View file

@ -178,7 +178,7 @@ class Product(Base):
img: str = ""
packing: int = None
producer: str = ""
rupture: bool = False
rupture: str = None
def __str__(self):
out = self.name

View file

@ -24,7 +24,7 @@
<tbody>
{% for product in delivery.get_products_by(producer) %}
<tr>
<th class="product">{{ product }}</th>
<th class="product {% if product.rupture %}rupture{% endif %}">{{ product }} {% if product.rupture %}(RUPTURE !){% endif %}
<td>{{ product.price | round(2) }} €</td>
{% if delivery.has_packing %}
<td class="packing">{% if product.packing %}{{ product.packing }} x {% endif %} {{ product.unit }}</td>