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, null=True, max_length=40)
    CallerIDName = models.CharField(max_length=100)
    ConnectedLineNum = models.CharField(blank=True, null=True, 
max_length=100)
    ConnectedLineName = models.CharField(blank=True, null=True, 
max_length=100)
    AccountCode = models.CharField(blank=True, null=True, max_length=100)
    Context = models.CharField(blank=True, null=True, max_length=100)
    Exten = models.CharField(blank=True, null=True, max_length=100)
    Priority = models.IntegerField(blank=True, null=True, max_length=10)
    Uniqueid = models.CharField(max_length=100)
    Application = models.CharField(blank=True, null=True, max_length=100)
    Duration = models.TimeField()
    BridgeId = models.CharField(blank=True, null=True, max_length=200)
    controle = models.IntegerField(max_length=1, default=0, blank=True, 
null=True)
    
    def __unicode__(self):
       return unicode(self.ChannelState)

Em quarta-feira, 20 de maio de 2015 12:02:17 UTC-3, Shai Efrati escreveu:
>
> 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 <elu...@gmail.com <javascript:>> 
> 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 <elu...@gmail.com> 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 <elu...@gmail.com> 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 <elu...@gmail.com> 
>>>>> 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 django-users...@googlegroups.com.
>>>>>> To post to this group, send email to django...@googlegroups.com.
>>>>>> 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
>>>>>>  
>>>>>> <https://groups.google.com/d/msgid/django-users/45c32aa1-22cb-4c62-8ce2-cb8442201f70%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>>>> .
>>>>>> 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 django-users...@googlegroups.com.
>>>> To post to this group, send email to django...@googlegroups.com.
>>>> 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
>>>>  
>>>> <https://groups.google.com/d/msgid/django-users/be3a5b52-3808-4dc8-8d71-07b331583d76%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>> .
>>>>
>>>> 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 django-users...@googlegroups.com.
>> To post to this group, send email to django...@googlegroups.com.
>> 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
>>  
>> <https://groups.google.com/d/msgid/django-users/63bebccd-e51c-49b9-b1a5-ef303d8f6aa2%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>> 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 django-users...@googlegroups.com <javascript:>.
> To post to this group, send email to django...@googlegroups.com 
> <javascript:>.
> 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
>  
> <https://groups.google.com/d/msgid/django-users/7cb38c84-ae3a-45a8-97e1-d3ce3c7472a7%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> 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 django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
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/739a3a90-aade-4250-8d66-bd08339d72fa%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to