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 <elui...@gmail.com> wrote: > > Shai Efrati, > > rt.controle is create by in view: > > exten = rt_calls.objects.all() > &g

Re: ELSE don't work

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

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 <elui...@gmail.com> wrote: > Shai Efrati, > > Thanks for answer... > > rt.controle pass always 0 or 1 > I not pass any value.. only 0 or 1 > > Tha

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

Re: How can I get this result?

2015-02-15 Thread Shai Efrati
sorry. assuming: l = [{'key1':'a' , 'key2': 'b'},{'key1':'c' , 'key2': 'd'}] for e in l: for k, v in e.iteritems(): print v, print On 2/15/15, Shai Efrati <sha...@gmail.com> wrote: > assuming: > l = [{'key1':a , 'key2': b},{'key1':c , 'key2': d}] > > for e in

Re: How can I get this result?

2015-02-15 Thread Shai Efrati
assuming: l = [{'key1':a , 'key2': b},{'key1':c , 'key2': d}] for e in l: for k, v in iteritems(e): print v, print On 2/15/15, aronivi...@gmail.com wrote: > [{'key1':a , 'key2': b},{'key1':c , 'key2': d}] > a,b > c,d > > -- > You received this message

Re: Python question about positioning of "from... import" statement

2014-10-01 Thread Shai Efrati
Hi! If i'm not wrong, the reason is that you try to import rango.models before django.setup() Try moving django.setup() after you import django and then your from rango.models import Category, Page Though i'm not sure it will work either, because you call:

Re: jquery in included html file

2014-05-05 Thread Shai Efrati
How did you use it in the nav.html file? Can you please write it here, maybe it's a reference issue. On Monday, May 5, 2014, Andreas Bloch wrote: > How do you access (or include) jquery in a file, which is included? > I'm getting a "Uncaught ReferenceError: $ is not defined"

Re: CSS not rendering correctly

2014-04-02 Thread Shai Efrati
It seems to me that your app doesn't knwo where to pull the CSS from. Can you post your directories structure and your base.html? Shai. On Wed, Apr 2, 2014 at 2:45 PM, Warren Jacobus wrote: > Hi, > > I'm having some trouble with my css in my django app. See pic for how

Re: __unicode__() addition not working in basic poll application.

2014-03-27 Thread Shai Efrati
i wonder if it is just the formatting of the email, but i think you missed spaces before your def. def are hierarchically under classes, so it should be: import datetime from django.db import models from django.utils import timezone # Create your models here. class Poll(models.Model):

Re: Referring to the page -- https://docs.djangoproject.com/en/1.6/intro/tutorial01/

2014-03-27 Thread Shai Efrati
Hi Dan, In the shell, did you re-import your Poll model? (>>> from polls.models import Poll) I think you might use a previous version of your model (without the changes), and that's why it doesn't recognize it. I might be wrong though :) Please let me know if it worked. Shai. On Thu, Mar

Re: Get secret key from django settings

2014-03-25 Thread Shai Efrati
Hi Errfan, You can get the SECRET_KEY through the environment variables. Just use: from os import environ SECRET_KEY = environ.get('SECRET_KEY') Good luck! Shai. On Tue, Mar 25, 2014 at 8:36 AM, Errfan Wadia wrote: > Hi, > > I am using from django.conf import