Django 1.7 compatibility. 

Replacing deprecated simplejson with json and deprecated mimetype with content_type