Try:

getattr(eachalert, criteria1_metric1) or something similar. look up
the getattr python function.

On 7/14/09, David <ww...@yahoo.com> wrote:
>
> still no lucky...
>
> 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.get(criteria1_metric1)
> AttributeError: 'Alert' object has no attribute 'get'
>>>>
>
>
>
>
> On Jul 13, 3:53 pm, Javier Guerra <jav...@guerrag.com> wrote:
>> On Mon, Jul 13, 2009 at 5:48 PM, David<ww...@yahoo.com> wrote:
>> > TypeError: 'Alert' object is unsubscriptable
>>
>> sorry, i was mixing languages.
>>
>> try "e_metric1 = eachalert.get (criteria1_metric1)"
>>
>> --
>> Javier
> >
>

-- 
Sent from my mobile device

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to