Move Tastypie API to its own Django app.
Add edit conflict detection.

Also fix a ToOneField in resources.py