mysociety / yournextrepresentative

A website for crowd-sourcing structured election candidate data
https://candidates.democracyclub.org.uk/
GNU Affero General Public License v3.0
56 stars 21 forks source link

teach CSV_ROW_FIELDS and PersonExtra.as_list_of_dicts about custom fields #915

Open mhl opened 8 years ago

mhl commented 8 years ago

At the moment the list of columns to include in CSV output is hardcoded in:

However, many of these fields are now defined by SimplePopoloField and ComplexPopoloField - someone could remove twitter_username, for example, which would cause the code problems at the moment.

It would be good to make those sections of code use SimplePopoloField and ComplexPopoloField to determine the columns and values to be included in the CSV files.