in your view new_leave and a are QuerySet objects, and then you are
comparing them to a string ("True") not a bolean (True without quotes), so
it's always False.Even if you change "True" to True it won't work, try it like this if new_leave.exists() and a.exists(): return ... On Thu, Jan 15, 2015 at 8:40 PM, sum abiut <[email protected]> wrote: > > > Hi, > I am trying to two column and display some result if two conditions are > meet but i am getting this error: > > The view eLeave.views.FMKD1_leave_to_authorize didn't return an HttpResponse > object. It returned None instead. > > > I can seems to figure out the issue, here is my view.py file > > def FMKD1_leave_to_authorize(request): > new_leave > =newleave.objects.filter(department_head_authorization="Approved" ) > a = newleave.objects.filter(department="FMKD") > if new_leave=="True"and a =="True": > return render_to_response('FMKD1_display_approve_leave.html', > locals()) > > -- > 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/CAPCf-y7uRsM8Vx6Jj5QD4ZY%2BCk24SkgCHZv-xMGZr49icPrmrA%40mail.gmail.com > <https://groups.google.com/d/msgid/django-users/CAPCf-y7uRsM8Vx6Jj5QD4ZY%2BCk24SkgCHZv-xMGZr49icPrmrA%40mail.gmail.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 [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/CALn3ei0QaQbwb%3DvkGJ6%2B4DB19p2ZDjTzJb1fSmoAhWUGg_H5PA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.

