When you say that you want to “export the data”, does this mean that you want your view to send this data as a file to be downloaded by the browser?
If so, then take a look at this thread: download filtered data as csv
For a more comprehensive solution, you can also take a look at Django import / export — django-import-export 3.2.1.dev0 documentation