Thanks Amit. Here is the problem that I meet. alerts = Alert.objects.filter((Q(dataset=dataset1)
for eachalert in alerts: e_metric1 = eachalert.criteria1_metric1 Django complains that there is no such item "criteria1_metric1" in Alert class. This is correct as Alert class does not have such an item. The "criteria1_metric1" is a variable here that has a value. And this value is an item in the Alert class. How to let Django know that the "criteria1_metric1" is a variable instead of a class item (table column)? Thanks again. On Jul 13, 2:14 pm, Amit Sethi <amit.pureene...@gmail.com> wrote: > I am not sure what you are trying to do. And the code seems almost unreadable > . > You could try posting the code to :http://pastebin.com/ > > Also what might be helpful: > What is the problem statement what is this code trying to solve ? > > What value you want and where ? > > And what error does django give ... > > -- > A-M-I-T S|S --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---