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:
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 = 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?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 createsrt.controle?--When i don't have 0 or 1 i need show some thing...Let me explain the situation...0 = Show when calls is RING1 = Show when the calls is ANSWERWhen i don't have calls, i need show some thing . I have an python script making insert in real time all calls statement in mysqlYou 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 1I not pass any value.. only 0 or 1Thanks
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
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
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
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/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 django-users+unsubscribe@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/ca83bbf4-ea2c-4b1e-8279-54372ee2b3ba%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
No comments:
Post a Comment