kopia lustrzana https://github.com/wagtail/wagtail
Mention WAGTAILDOCS_EXTENSIONS in 'integrating into Django' docs
rodzic
f39a91a67e
commit
00d1d134aa
|
@ -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
|
||||
```
|
||||
|
|
|
@ -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
|
||||
|
|
Ładowanie…
Reference in New Issue