I have a View & amp; A template that displays a list of items types is fine, but rather than displaying all kinds of items for that customer. What do I want to do, list of type individually is displayed For example, if an item is a type stored, say "normal". I want to display all the items that have only one type called "normal". View template You can try 'client.storageitem_set.filter' (type = YOUR_TYPE): docs: Html>
def client_summary (request, client_id): Client = any item = no attempt: client = model. Client.com.gate (pk = client_id) item = client.storageitem_set.all (excluding total_items = items.count (): Return HttpResponse (reverse (return_clients)) return to render_to_response ('client_summary.html', {'item'
Client.name}} Total number of items: {{total_items}} {% for item in items} {{item.type}} {% endfor%}
Comments
Post a Comment