my django server dies whenever i login and access the following function:

what is a better way to do what im doing. I need to loop through all of the 
vm_groups by customer id, and then loop through all of the vms and 
associate them with each other.
The code below is what i have but its not working. django just kills its 
self.

def portal(request):
    
    query_results = Customer.objects.all()
    
    for result in query_results:
       customer_id = Customer.objects.values('customer_id')
       
       vm_group = Vm_group.objects.filter(customer=customer_id)
       
       for result in vm_group:
          vm_group_ids = Vm_group.objects.values('vm_group_id')
          
          for result in vm_group_ids:
             vms = Vm.objects.filter(vm_group_id=vm_group_ids)
    

    context = Context({'customer': query_results, 'vm_group': vm_group, 
'vms': vms,
                                                })

    return render(request, 'portal.html', context)

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/84cc69c3-b925-4bfb-b321-5918b5030c6e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to