Skip to content

Releases: django-commons/drf-excel

2.0.0

22 Feb 15:40
Compare
Choose a tag to compare

What's Changed

  • Support was added for column data styles and global date, time, and datetime formats @rptmat57 in #50
    • This is a breaking change for anyone who was using xlsx_date_format_mappings; please update to use column_data_styles
  • Typos were fixed by @runningzyp in #52

column_data_styles example

This new features allows for flexible styling at the column level:

column_data_styles = {
    'distance': {
        'alignment': {
            'horizontal': 'right',
            'vertical': 'top',
        },
        'format': '0.00E+00'
    },
    'created_at': {
        'format': '%d.%m.%Y %H:%M',
    }
}

New Contributors

Full Changelog: 1.0.0...2.0.0

1.0.0

18 Feb 19:26
Compare
Choose a tag to compare

What's Changed

  • 1.0.0 release! We're moving to Semantic Versioning to improve communication for future breaking changes.
  • New name: drf-excel is the new package name, which is less obtuse than the previous package name.
  • TL;DR upgrade path: replace drf_renderer_xlsx in your code with drf_excel. Otherwise, the class names and renderer paths are remaining the same.

0.4.5

15 Feb 13:03
Compare
Choose a tag to compare

What's Changed

  • Fixed issue with flattening non-string arrays by @rptmat57 in #47
  • Support DateField for xlsx_date_format_mappings by @vincenz-e in #48

New Contributors

Full Changelog: 0.4.4...0.4.5

0.4.4

13 Dec 15:50
5d78b74
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: 0.4.3...0.4.4

0.4.3

09 Nov 13:57
82af43b
Compare
Choose a tag to compare

Fix for Relase 0.4.2 (custom_cols is None)
Full Changelog: 0.4.2...0.4.3

0.4.1

12 Jul 14:57
Compare
Choose a tag to compare
  • Support for nested serializers has been improved and expanded.
  • Properly flattens headers from nested serializers.
  • Proper escaping for possible malicious characters.
  • Only checks list or dict types during the render process.

0.4.0

26 Mar 14:56
Compare
Choose a tag to compare
  • Adds support for nested serializers.

0.3.9

29 Dec 15:19
d6708cc
Compare
Choose a tag to compare
  • Fixes an edge case where a date is included in an array inside a field.

0.3.8

21 Sep 13:24
Compare
Choose a tag to compare
  • Adds support for lists and ReturnList.
  • Bug fix: converts values to strings when flattening in case of None values.

0.3.7

18 Jan 23:52
Compare
Choose a tag to compare

0.3.7

  • Better logic for flattening lists within cells. Bug fix for ViewSets with other actions, only applying to Response instances.

0.3.6

  • Check to ensure lists have length before flattening.

0.3.5

  • Add the get_filename method to allow programmatically naming the downloaded spreadsheet file.

0.3.4

  • Switch to setuptools_scm. Add support for ReturnDict in addition to ReturnList.

0.3.3

  • Add support for nested arrays, flattening them into a string: value1, value2, value3, etc.

0.3.2

  • Add supported for nested values; flattens sub-values into sub.value1, sub.value2, sub.value3, etc.

0.3.1

  • Fix an error when an empty result set was returned from the endpoint. Now, it will properly just download an empty spreadsheet.
  • Remove an errant format() function which was removing typing from the spreadsheet.

0.3.0

  • Add support for custom spreadsheet styles (thanks, Pavel Bryantsev!)
  • Add an attribute for setting the download filename instead of export.xlsx per view.