Re: ELSE don't work

2015-05-20 Thread Emerson Luiz
Hi, This solve my problem: https://docs.djangoproject.com/en/1.8/ref/templates/builtins/#for-empty Thanks all... Em quarta-feira, 20 de maio de 2015 13:19:23 UTC-3, Emerson Luiz escreveu: > > Shai Efrati, > > this: > > > class rt_calls(models.Model): > Channel =

Re: ELSE don't work

2015-05-20 Thread Emerson Luiz
Shai Efrati, this: class rt_calls(models.Model): Channel = models.CharField(blank=True, null=True, max_length=100) ChannelState = models.IntegerField() ChannelStateDesc = models.CharField(blank=True, null=True, max_length=10) CallerIDNum = models.IntegerField(blank=True,

Re: ELSE don't work

2015-05-20 Thread Shai Efrati
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 wrote: > > Shai Efrati, > > rt.controle is create by in view: > > exten = rt_calls.objects.all() > > Em quarta-feira, 20 de maio de

Re: ELSE don't work

2015-05-20 Thread Emerson Luiz
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

Re: ELSE don't work

2015-05-20 Thread Shai Efrati
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 wrote: > > When i don't have 0 or 1 i need show some thing... > > Let me explain the situation... > > 0 = Show when calls is

Re: ELSE don't work

2015-05-20 Thread Tom Evans
On Wed, May 20, 2015 at 3:00 PM, Emerson Luiz 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

Re: ELSE don't work

2015-05-20 Thread Emerson Luiz
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

Re: ELSE don't work

2015-05-20 Thread Emerson Luiz
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 Thanks Em

Re: ELSE don't work

2015-05-20 Thread Shai Efrati
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 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

Re: ELSE don't work

2015-05-20 Thread Emerson Luiz
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

Re: ELSE don't work

2015-05-20 Thread Shai Efrati
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 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

ELSE don't work

2015-05-20 Thread Emerson Luiz
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