mirror of
https://github.com/almet/copanier.git
synced 2025-04-28 19:42:37 +02:00
Make import / export work with ruptures. Fixes #4
This commit is contained in:
parent
2e524c92c1
commit
931cc77f11
3 changed files with 4 additions and 2 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -3,3 +3,5 @@ __pycache__
|
||||||
tmp/
|
tmp/
|
||||||
db/
|
db/
|
||||||
venv
|
venv
|
||||||
|
.env
|
||||||
|
.vscode
|
|
@ -178,7 +178,7 @@ class Product(Base):
|
||||||
img: str = ""
|
img: str = ""
|
||||||
packing: int = None
|
packing: int = None
|
||||||
producer: str = ""
|
producer: str = ""
|
||||||
rupture: bool = False
|
rupture: str = None
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
out = self.name
|
out = self.name
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
<tbody>
|
<tbody>
|
||||||
{% for product in delivery.get_products_by(producer) %}
|
{% for product in delivery.get_products_by(producer) %}
|
||||||
<tr>
|
<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>
|
<td>{{ product.price | round(2) }} €</td>
|
||||||
{% if delivery.has_packing %}
|
{% if delivery.has_packing %}
|
||||||
<td class="packing">{% if product.packing %}{{ product.packing }} x {% endif %} {{ product.unit }}</td>
|
<td class="packing">{% if product.packing %}{{ product.packing }} x {% endif %} {{ product.unit }}</td>
|
||||||
|
|
Loading…
Reference in a new issue