refactoring due to deprecation warning: use content_type rather tan mimetype in HttpResponse