I have a postgres database in Django and one of the tables has a foreign key and a number of entries. I want to generate a csv file with one row per foreign key. i.e. this i