rollbar/pyrollbar — pull request #18 by rhcarvalho (2014-02-26 12:55:55+00:00)
Title: Support request objects from Django REST framework

This patch allows one to notify Rollbar with request context from within [Django REST framework](http://www.django-rest-framework.org/) views.

Rollbar's Django middleware works fine because at that point the request object is a standard HttpRequest, but if one calls `rollbar.report_exc_info` inside a REST framework view, the request context in silently ignored.

[Django REST framework extends Django's `HttpRequest` by composition](http://www.django-rest-framework.org/api-guide/requests#standard-httprequest-attributes), so that checking with `isinstance` doesn't identify it as compatible with Django's `HttpRequest`.