mjumbewu / django-rest-framework-csv

CSV Tools for Django REST Framework
BSD 2-Clause "Simplified" License
364 stars 89 forks source link

added labels to parser for changing column names #77

Closed An4ik closed 3 years ago

An4ik commented 6 years ago

Hi, I've met the same issue as Issue#74 and decided to share my solution.

The problem: I wanted to serialize data coming from csv file. But the problem with column names, so solved it like in renderer class. just added labels attribute which changes column names (coming from csv) with field names.

just visa versa to renderer.

Hope that it's fine Thanks.