use content_type parameter instead of deprecated mimetype

Fix compatibility with Django 1.6