azavea/OpenTreeMap-cloud — pull request #15 by steventlamb (2013-03-14 14:44:58+00:00)
Title: Add scope_model method to Instance

Each instance can filter down any model with an instance field down
to records from that instance. The recommended usage is to apply
this method on the instance that is hanging off of a request.

If an model doesn't have an instance field, Django would raise a
FieldError, just like when using the ORM.