Replace deprecated mimetype keyword to content_type.
Response form validation errors in json format.
Replace depricated request.raw_post_data to request.POST.