Skip to content

Commit a53e523

Browse files
authored
We've renamed the drf-renderer-xlsx package to drf-excel. (#8396)
1 parent efc7c1d commit a53e523

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

docs/api-guide/renderers.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -470,15 +470,15 @@ Modify your REST framework settings.
470470

471471
[MessagePack][messagepack] is a fast, efficient binary serialization format. [Juan Riaza][juanriaza] maintains the [djangorestframework-msgpack][djangorestframework-msgpack] package which provides MessagePack renderer and parser support for REST framework.
472472

473-
## XLSX (Binary Spreadsheet Endpoints)
473+
## Microsoft Excel: XLSX (Binary Spreadsheet Endpoints)
474474

475-
XLSX is the world's most popular binary spreadsheet format. [Tim Allen][flipperpa] of [The Wharton School][wharton] maintains [drf-renderer-xlsx][drf-renderer-xlsx], which renders an endpoint as an XLSX spreadsheet using OpenPyXL, and allows the client to download it. Spreadsheets can be styled on a per-view basis.
475+
XLSX is the world's most popular binary spreadsheet format. [Tim Allen][flipperpa] of [The Wharton School][wharton] maintains [drf-excel][drf-excel], which renders an endpoint as an XLSX spreadsheet using OpenPyXL, and allows the client to download it. Spreadsheets can be styled on a per-view basis.
476476

477477
#### Installation & configuration
478478

479479
Install using pip.
480480

481-
$ pip install drf-renderer-xlsx
481+
$ pip install drf-excel
482482

483483
Modify your REST framework settings.
484484

@@ -488,15 +488,15 @@ Modify your REST framework settings.
488488
'DEFAULT_RENDERER_CLASSES': [
489489
'rest_framework.renderers.JSONRenderer',
490490
'rest_framework.renderers.BrowsableAPIRenderer',
491-
'drf_renderer_xlsx.renderers.XLSXRenderer',
491+
'drf_excel.renderers.XLSXRenderer',
492492
],
493493
}
494494

495495
To avoid having a file streamed without a filename (which the browser will often default to the filename "download", with no extension), we need to use a mixin to override the `Content-Disposition` header. If no filename is provided, it will default to `export.xlsx`. For example:
496496

497497
from rest_framework.viewsets import ReadOnlyModelViewSet
498-
from drf_renderer_xlsx.mixins import XLSXFileMixin
499-
from drf_renderer_xlsx.renderers import XLSXRenderer
498+
from drf_excel.mixins import XLSXFileMixin
499+
from drf_excel.renderers import XLSXRenderer
500500

501501
from .models import MyExampleModel
502502
from .serializers import MyExampleSerializer
@@ -549,7 +549,7 @@ Comma-separated values are a plain-text tabular data format, that can be easily
549549
[mjumbewu]: https://github.com/mjumbewu
550550
[flipperpa]: https://github.com/flipperpa
551551
[wharton]: https://github.com/wharton
552-
[drf-renderer-xlsx]: https://github.com/wharton/drf-renderer-xlsx
552+
[drf-excel]: https://github.com/wharton/drf-excel
553553
[vbabiy]: https://github.com/vbabiy
554554
[rest-framework-yaml]: https://jpadilla.github.io/django-rest-framework-yaml/
555555
[rest-framework-xml]: https://jpadilla.github.io/django-rest-framework-xml/

0 commit comments

Comments
 (0)