>
> On Fri, Aug 31, 2012 at 9:17 PM, Micky Hulse <rgmi...@gmail.com> wrote:
> > I'd like to add:
> > if objects.status_code != 200:
> >         return objects
> > ... which is found via this code:
> > <https://gist.github.com/871954>
>
> Doh! After a bit of trial and error, I given up on trying to merge
> those two code snippets.
>
> I'd still like to know what `if isinstance(objects, HttpResponse)` is
> doing?


All that is doing is checking to see if the object named "objects" is an
HttpResponse object.

According to this doc (
https://docs.djangoproject.com/en/dev/ref/request-response/#id4) it appears
that the objects.status_code *should* work, although I'm not sure if it
returns a number or a string. I'm not sure why this isn't working for you,
though.

-- 
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+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to