From f39a91a67ef2da69a36c24163c6b173a963eaf45 Mon Sep 17 00:00:00 2001 From: Matt Westcott Date: Mon, 4 Mar 2024 23:55:57 +0000 Subject: [PATCH] Set a default WAGTAILDOCS_EXTENSIONS list in project template --- wagtail/project_template/project_name/settings/base.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/wagtail/project_template/project_name/settings/base.py b/wagtail/project_template/project_name/settings/base.py index 01cffa7a3056..14c940634594 100644 --- a/wagtail/project_template/project_name/settings/base.py +++ b/wagtail/project_template/project_name/settings/base.py @@ -172,3 +172,9 @@ # Base URL to use when referring to full URLs within the Wagtail admin backend - # e.g. in notification emails. Don't include '/admin' or a trailing slash WAGTAILADMIN_BASE_URL = "http://example.com" + +# 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']