{"version":"1.0","type":"rich","title":"Gist 033ea14fe76d6ec0e0a7","description":"This example shows three versions of a Django view endpoint that retrieves the lowest stock level for a set of item models tied to a subbooking. The first version is a dense one-liner that queries each item ID individually, while the second and third versions optimize by filtering all item models at once using Django’s ORM `filter(id__in=pks)`. The code relies on Django’s `Response` object, `ItemModel.objects`, and `request.QUERY_PARAMS` to parse incoming query parameters, with each version producing the same dictionary mapping item primary keys to their lowest stock values.","provider_name":"VizHub AI Studio","provider_url":"https://next.vizhub.com","html":"<iframe src=\"https://next.vizhub.com/viz/gist-033ea14fe76d6ec0e0a7?mode=embed\" width=\"960\" height=\"500\" scrolling=\"no\" frameborder=\"1\"></iframe>","width":960,"height":500,"cache_age":3600}