In addition to the other answers, I will suggest that you re-think your 
view logic - you haven't handled the case where your IF block fails. 
Remember, Django expects every view function to return a HttpResponse 
object. Assume that someone's request isn't authorized (yet) or even 
rejected. What do you want them to see? It's good user experience to at 
least show an error message instead of throwing them back to the home-page.

-Abraham V.


On Friday, January 16, 2015 at 5:11:10 AM UTC+5:30, suabiut 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 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/0a995400-c49c-455e-86ee-2dc89f56c963%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to