Closed nerjan closed 1 year ago
class ExampleSerializer(serializers.Serializer): color = serializers.SerializerMethodField() def get_color(self, instance): color_map = {'w': 'FFFFFFCC', 'a': 'FFFFCCCC'} return color_map.get(instance.alarm_level, 'FFFFFFFF')
This class from example should have "color" changed to "row_color", as described here https://stackoverflow.com/questions/57709727/drf-formatting-xlsx-content
I've updated this in the Configuring Styles section. Thanks for the catch, @nerjan!
This class from example should have "color" changed to "row_color", as described here https://stackoverflow.com/questions/57709727/drf-formatting-xlsx-content