changed mimetype to content_type as per django1.5 deprecation rules.