From 7935b5b57da09c2c01f387c3528e614d9ebe2d92 Mon Sep 17 00:00:00 2001 From: Yaro Kasear Date: Fri, 3 Oct 2025 14:27:51 -0500 Subject: [PATCH] Working on better inventory entry form. --- inventory/routes/entry.py | 4 ++-- inventory/templates/entry.html | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/inventory/routes/entry.py b/inventory/routes/entry.py index 5ed0007..1763e02 100644 --- a/inventory/routes/entry.py +++ b/inventory/routes/entry.py @@ -16,7 +16,8 @@ def _fields_for_model(model: str): if model == "inventory": fields = ["label", "name", "serial", "barcode", "brand", "model", - "device_type", "owner", "location", "condition", "image", "notes"] + "device_type", "owner", "location", "condition", "image", + "notes", "work_logs"] fields_spec = [ {"name": "label", "type": "display", "label": "", "row": "label", "attrs": {"class": "display-6 mb-3"}, "wrap": {"class": "col"}}, @@ -102,7 +103,6 @@ def _fields_for_model(model: str): ] elif model == "worklog": - # tell the service to eager-load precisely what the template needs fields = [ "id", "contact.label", diff --git a/inventory/templates/entry.html b/inventory/templates/entry.html index d107960..3c8c6bf 100644 --- a/inventory/templates/entry.html +++ b/inventory/templates/entry.html @@ -1,6 +1,7 @@ {% extends 'base.html' %} {% block main %} +
{{ form | safe }}