What do you have in models.py for rt_calls? Did you try passing values that are not 0 or 1?
> On May 20, 2015, at 5:47 PM, Emerson Luiz <[email protected]> wrote: > > Shai Efrati, > > rt.controle is create by in view: > > exten = rt_calls.objects.all() > > Em quarta-feira, 20 de maio de 2015 11:33:22 UTC-3, Shai Efrati escreveu: >> >> In the gist you show only the template. Can you send a gist with the code >> that creates >> rt.controle? >> >> >> On May 20, 2015, at 5:02 PM, Emerson Luiz <[email protected]> wrote: >> >>> When i don't have 0 or 1 i need show some thing... >>> >>> Let me explain the situation... >>> >>> 0 = Show when calls is RING >>> 1 = Show when the calls is ANSWER >>> >>> When i don't have calls, i need show some thing . I have an python script >>> making insert in real time all calls statement in mysql >>> >>> >>> You can see the code here: >>> https://gist.github.com/eluizbr/dd8dd597c83175cd5866 >>> >>> Thanks >>> >>> Em quarta-feira, 20 de maio de 2015 10:55:35 UTC-3, Shai Efrati escreveu: >>>> >>>> So, when do you expect else? It seems that you don't pass such values. >>>> >>>> On Wed, May 20, 2015 at 4:52 PM, Emerson Luiz <[email protected]> wrote: >>>>> Shai Efrati, >>>>> >>>>> Thanks for answer... >>>>> >>>>> rt.controle pass always 0 or 1 >>>>> I not pass any value.. only 0 or 1 >>>>> >>>>> Thanks >>>>> >>>>> Em quarta-feira, 20 de maio de 2015 10:45:25 UTC-3, Shai Efrati escreveu: >>>>>> >>>>>> What does rt.controle hold? >>>>>> Do you pass any values that are not 0 or 1? >>>>>> >>>>>> On Wed, May 20, 2015 at 4:37 PM, Emerson Luiz <[email protected]> wrote: >>>>>>> Hi, >>>>>>> >>>>>>> I have the following logic: >>>>>>> >>>>>>> {% if rt.controle == 1 and rt.Exten|length > 7 %} >>>>>>> WORK's >>>>>>> {% elif rt.controle == 1 %} >>>>>>> WORK's >>>>>>> {% elif rt.controle == 0 and rt.Exten|length > 7 %} >>>>>>> WORK's >>>>>>> {% elif rt.controle == 0 %} >>>>>>> WORK's >>>>>>> {% else %} >>>>>>> DON'T WORK's >>>>>>> >>>>>>> {% endif %} >>>>>>> >>>>>>> >>>>>>> My problem here is the ELSE statement don't work's. Someone can show me >>>>>>> where i make's error ? >>>>>>> >>>>>>> Thanks. >>>>>>> -- >>>>>>> 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 [email protected]. >>>>>>> To post to this group, send email to [email protected]. >>>>>>> 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/45c32aa1-22cb-4c62-8ce2-cb8442201f70%40googlegroups.com. >>>>>>> For more options, visit https://groups.google.com/d/optout. >>>>>> >>>>> >>>>> -- >>>>> 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 [email protected]. >>>>> To post to this group, send email to [email protected]. >>>>> 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/be3a5b52-3808-4dc8-8d71-07b331583d76%40googlegroups.com. >>>>> >>>>> For more options, visit https://groups.google.com/d/optout. >>>> >>> >>> -- >>> 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 [email protected]. >>> To post to this group, send email to [email protected]. >>> 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/63bebccd-e51c-49b9-b1a5-ef303d8f6aa2%40googlegroups.com. >>> For more options, visit https://groups.google.com/d/optout. > > -- > 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 [email protected]. > To post to this group, send email to [email protected]. > 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/7cb38c84-ae3a-45a8-97e1-d3ce3c7472a7%40googlegroups.com. > For more options, visit https://groups.google.com/d/optout. -- 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 [email protected]. To post to this group, send email to [email protected]. 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/596506C1-8DE0-4DFC-B3EA-12B5559B9495%40gmail.com. For more options, visit https://groups.google.com/d/optout.

