title: I want to use inline for loop in the following way
body: <p>anyone please correct me in writing for loop in Django template , see below code to understand what im trying to do</p>
  
  <pre><code>{% for item in items and for quantity in quantities %}
  </code></pre>
  
  <p>here is my views.py</p>
  
  <pre><code>def addtocart(request):
  if request.method == 'POST':
      items = []
      quantity = []
      for item in MenuModel.objects.all():
          if int(request.POST[str(item.id)])!=0:
              items.append(item.item_name)
              quantity.append(request.POST[str(item.id)])
      context = {'items' : items, 'quantities' : quantity}
  return render(request,"gupsupapp/checkout.html",context)
  </code></pre>