Skip to content

Commit

Permalink
Remove lesser-used archive formats from WAGTAILDOCS_EXTENSIONS list
Browse files Browse the repository at this point in the history
  • Loading branch information
gasman committed Mar 7, 2024
1 parent 5e5619d commit 92d1ff5
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion docs/advanced_topics/add_to_django_project.md
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ WAGTAIL_SITE_NAME = 'My Project'
# This can be omitted to allow all files, but note that this may present a security risk
# if untrusted users are allowed to upload files -
# see https://docs.wagtail.org/en/stable/advanced_topics/deploying.html#user-uploaded-files
WAGTAILDOCS_EXTENSIONS = ['7z', 'bz2', 'csv', 'docx', 'gz', 'key', 'odt', 'pdf', 'pptx', 'rar', 'rtf', 'tar', 'txt', 'xlsx', 'zip']
WAGTAILDOCS_EXTENSIONS = ['csv', 'docx', 'key', 'odt', 'pdf', 'pptx', 'rtf', 'txt', 'xlsx', 'zip']

# Reverse the default case-sensitive handling of tags
TAGGIT_CASE_INSENSITIVE = True
Expand Down
2 changes: 1 addition & 1 deletion docs/getting_started/integrating_into_django.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ If this setting is not present, Wagtail will fall back to `request.site.root_url
Add a `WAGTAILDOCS_EXTENSIONS` setting to specify the file types that Wagtail will allow to be uploaded as documents. This can be omitted to allow all file types, but this may present a security risk if untrusted users are allowed to upload documents - see [](user_uploaded_files).

```python
WAGTAILDOCS_EXTENSIONS = ['7z', 'bz2', 'csv', 'docx', 'gz', 'key', 'odt', 'pdf', 'pptx', 'rar', 'rtf', 'tar', 'txt', 'xlsx', 'zip']
WAGTAILDOCS_EXTENSIONS = ['csv', 'docx', 'key', 'odt', 'pdf', 'pptx', 'rtf', 'txt', 'xlsx', 'zip']
```

Various other settings are available to configure Wagtail's behaviour - see [Settings](/reference/settings).
Expand Down
2 changes: 1 addition & 1 deletion wagtail/project_template/project_name/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,4 +177,4 @@
# This can be omitted to allow all files, but note that this may present a security risk
# if untrusted users are allowed to upload files -
# see https://docs.wagtail.org/en/stable/advanced_topics/deploying.html#user-uploaded-files
WAGTAILDOCS_EXTENSIONS = ['7z', 'bz2', 'csv', 'docx', 'gz', 'key', 'odt', 'pdf', 'pptx', 'rar', 'rtf', 'tar', 'txt', 'xlsx', 'zip']
WAGTAILDOCS_EXTENSIONS = ['csv', 'docx', 'key', 'odt', 'pdf', 'pptx', 'rtf', 'txt', 'xlsx', 'zip']

0 comments on commit 92d1ff5

Please sign in to comment.