replacing mimetype by content_type, django 1.6