Added example of programmatically converting list of resources into JSON within a django template.

Fixes #964. Fixes #442.