Friday, August 31, 2012

Re: What does this code do? Also, testing decorator via terminal?

On Fri, Aug 31, 2012 at 9:17 PM, Micky Hulse <rgmicky@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?

I've RTM'd:

<http://docs.python.org/library/functions.html#isinstance>

and

<https://code.djangoproject.com/wiki/HttpResponse>

... but what doe these bits of code accomplish when working together?

Thanks for listening. :)

M

--
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.

No comments:

Post a Comment