Skip to content

Instantly share code, notes, and snippets.

@professorplumb
Last active December 19, 2015 23:49
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save professorplumb/6037003 to your computer and use it in GitHub Desktop.
Save professorplumb/6037003 to your computer and use it in GitHub Desktop.
When displaying resources for a one-to-many model relationship in Tastypie, I often find myself using a pattern where the "base" (one) model has a URI to its associated collection of "related" (many) models. I wrote this gist which patches the resource classes to automatically add in the URI field, URL pattern, and related list view functions. S…
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment