1
0
mirror of https://gitlab.crans.org/bde/nk20 synced 2025-11-07 23:39:50 +01:00

Add field 'traces' for model Food

This commit is contained in:
Ehouarn
2025-11-02 18:43:33 +01:00
parent 4f016fed38
commit 48b1ef9ec8
5 changed files with 68 additions and 8 deletions

View File

@@ -32,7 +32,7 @@ class FoodTable(tables.Table):
class Meta:
model = Food
template_name = 'django_tables2/bootstrap4.html'
fields = ('name', 'owner', 'qr_code_numbers', 'allergens', 'date', 'expiry_date')
fields = ('name', 'owner', 'qr_code_numbers', 'allergens', 'traces', 'date', 'expiry_date')
row_attrs = {
'class': 'table-row',
'data-href': lambda record: 'detail/' + str(record.pk),