Skip to content

Commit

Permalink
Mention WAGTAILDOCS_EXTENSIONS in 'integrating into Django' docs
Browse files Browse the repository at this point in the history
  • Loading branch information
gasman committed Mar 7, 2024
1 parent f39a91a commit 00d1d13
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions docs/advanced_topics/add_to_django_project.md
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,12 @@ WAGTAIL_SITE_NAME = 'My Project'
# Wagtail email notification format
# WAGTAILADMIN_NOTIFICATION_USE_HTML = True

# Allowed file extensions for documents in the document library.
# 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']

# Reverse the default case-sensitive handling of tags
TAGGIT_CASE_INSENSITIVE = True
```
Expand Down
6 changes: 6 additions & 0 deletions docs/getting_started/integrating_into_django.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,12 @@ WAGTAILADMIN_BASE_URL = 'http://example.com'

If this setting is not present, Wagtail will fall back to `request.site.root_url` or to the hostname of the request. Although this setting is not strictly required, it is highly recommended because leaving it out may produce unusable URLs in notification emails.

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']
```

Various other settings are available to configure Wagtail's behaviour - see [Settings](/reference/settings).

## URL configuration
Expand Down

0 comments on commit 00d1d13

Please sign in to comment.