Exporting Django Objects model in CSV
问题 I want to create an extra action for the admin in django-admin. I want to be able to export the data as CSV format. I have written the following code in my admin.py : from django.contrib import admin from .models import News, ResourceTopic, Resource, PracticeTopic, Practice, Contacts, Visualization import csv from django.utils.encoding import smart_str from django.http import HttpResponse admin.site.register(News) admin.site.register(ResourceTopic) admin.site.register(Resource) admin.site