Use modern configuration for django-markdownify (#3286)

- Required to suppress some configuration warning messages
This commit is contained in:
Oliver 2022-07-04 07:45:36 +10:00 committed by GitHub
parent 830ecd5677
commit 1ed49dcb2e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -875,29 +875,31 @@ REMOTE_LOGIN_HEADER = get_setting('INVENTREE_REMOTE_LOGIN_HEADER', CONFIG.get('r
# Markdownify configuration # Markdownify configuration
# Ref: https://django-markdownify.readthedocs.io/en/latest/settings.html # Ref: https://django-markdownify.readthedocs.io/en/latest/settings.html
MARKDOWNIFY_WHITELIST_TAGS = [ MARKDOWNIFY = {
'a', 'default': {
'abbr', 'BLEACH': True,
'b', 'WHITELIST_ATTRS': [
'blockquote', 'href',
'em', 'src',
'h1', 'h2', 'h3', 'alt',
'i', ],
'img', 'WHITELIST_TAGS': [
'li', 'a',
'ol', 'abbr',
'p', 'b',
'strong', 'blockquote',
'ul' 'em',
] 'h1', 'h2', 'h3',
'i',
MARKDOWNIFY_WHITELIST_ATTRS = [ 'img',
'href', 'li',
'src', 'ol',
'alt', 'p',
] 'strong',
'ul'
MARKDOWNIFY_BLEACH = False ],
}
}
# Error reporting # Error reporting
SENTRY_ENABLED = get_setting('INVENTREE_SENTRY_ENABLED', CONFIG.get('sentry_enabled', False)) SENTRY_ENABLED = get_setting('INVENTREE_SENTRY_ENABLED', CONFIG.get('sentry_enabled', False))