Skip to content

Commit

Permalink
Remove extra indentation in README.
Browse files Browse the repository at this point in the history
  • Loading branch information
FlipperPA committed Feb 18, 2022
1 parent a998570 commit 8b92ffb
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@ pip install drf-excel
Then add the following to your `REST_FRAMEWORK` settings:

```python
REST_FRAMEWORK = {
...

'DEFAULT_RENDERER_CLASSES': (
'rest_framework.renderers.JSONRenderer',
'rest_framework.renderers.BrowsableAPIRenderer',
'def_excel.renderers.XLSXRenderer',
),
}
REST_FRAMEWORK = {
...

'DEFAULT_RENDERER_CLASSES': (
'rest_framework.renderers.JSONRenderer',
'rest_framework.renderers.BrowsableAPIRenderer',
'def_excel.renderers.XLSXRenderer',
),
}
```

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:
Expand Down

0 comments on commit 8b92ffb

Please sign in to comment.