Merge branch 'develop' into 11432-device-field

This commit is contained in:
Arthur 2023-03-31 14:58:45 -07:00
commit 676c849f13
4 changed files with 16 additions and 4 deletions

View File

@ -54,7 +54,7 @@ Within the shell, enter the following commands to create the database and user (
```postgresql ```postgresql
CREATE DATABASE netbox; CREATE DATABASE netbox;
CREATE USER netbox WITH PASSWORD 'J5brHrAXFLQSif0K'; CREATE USER netbox WITH PASSWORD 'J5brHrAXFLQSif0K';
GRANT ALL PRIVILEGES ON DATABASE netbox TO netbox; ALTER DATABASE netbox OWNER TO netbox;
``` ```
!!! danger "Use a strong password" !!! danger "Use a strong password"

View File

@ -2,6 +2,14 @@
## v3.4.8 (FUTURE) ## v3.4.8 (FUTURE)
### Enhancements
* [#12095](https://github.com/netbox-community/netbox/issues/12095) - Specify UTF-8 encoding for default export template MIME type
### Bug Fixes
* [#12084](https://github.com/netbox-community/netbox/issues/12084) - Fix exception when attempting to create a saved filter for applied filters
--- ---
## v3.4.7 (2023-03-28) ## v3.4.7 (2023-03-28)

View File

@ -8,6 +8,9 @@ theme:
custom_dir: docs/_theme/ custom_dir: docs/_theme/
icon: icon:
repo: fontawesome/brands/github repo: fontawesome/brands/github
features:
- content.code.copy
- navigation.footer
palette: palette:
- media: "(prefers-color-scheme: light)" - media: "(prefers-color-scheme: light)"
scheme: default scheme: default
@ -20,7 +23,8 @@ theme:
icon: material/lightbulb icon: material/lightbulb
name: Switch to Light Mode name: Switch to Light Mode
plugins: plugins:
- search - search:
lang: en
- mkdocstrings: - mkdocstrings:
handlers: handlers:
python: python:

View File

@ -301,7 +301,7 @@ class ExportTemplate(CloningMixin, ExportTemplatesMixin, WebhooksMixin, ChangeLo
max_length=50, max_length=50,
blank=True, blank=True,
verbose_name='MIME type', verbose_name='MIME type',
help_text=_('Defaults to <code>text/plain</code>') help_text=_('Defaults to <code>text/plain; charset=utf-8</code>')
) )
file_extension = models.CharField( file_extension = models.CharField(
max_length=15, max_length=15,
@ -357,7 +357,7 @@ class ExportTemplate(CloningMixin, ExportTemplatesMixin, WebhooksMixin, ChangeLo
Render the template to an HTTP response, delivered as a named file attachment Render the template to an HTTP response, delivered as a named file attachment
""" """
output = self.render(queryset) output = self.render(queryset)
mime_type = 'text/plain' if not self.mime_type else self.mime_type mime_type = 'text/plain; charset=utf-8' if not self.mime_type else self.mime_type
# Build the response # Build the response
response = HttpResponse(output, content_type=mime_type) response = HttpResponse(output, content_type=mime_type)