Thanks Javier. I got
Traceback (most recent call last): File "<console>", line 1, in <module> File "/home/dwang/alert/../alert/message/models.py", line 245, in check_criteria1 metric11 = eachalert[criteria1_metric1] TypeError: 'Alert' object is unsubscriptable >>> any more ideas? I am also googling online to see if I can find a solution. On Jul 13, 3:29 pm, Javier Guerra <jav...@guerrag.com> wrote: > On Mon, Jul 13, 2009 at 4:36 PM, David<ww...@yahoo.com> wrote: > > > 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 > > try "e_metric1 = eachalert[criteria1_metric1]" > > -- > Javier --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---