Wednesday, August 22, 2012

HttpResponseNotModified returning 200 code

Here is my code:

id = get_id(request)
     if id is not None:
         host = request.GET['host']
         if host!=None:
             command = command_queue.objects.all().filter(destination_hostname=host,user__id=id)
             if not command.count():
                 HttpResponseNotModified()
             retval = JSONResponse(command.values('command','command_text'),Extra={"success":True})
             command.delete()
             return retval
    return HttpResponseForbidden()

I know it's getting to the HttpResponseNotModified, but I'm still getting a HTTP status code of 200.

Can someone point me in the correct direction?
--
Thanks
Kevin Anthony
www.NoSideRacing.com

Do you use Banshee?
Download the Community Extensions:

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate