mirror of
https://github.com/inventree/InvenTree.git
synced 2025-06-15 19:45:46 +00:00
Merge remote-tracking branch 'inventree/master'
This commit is contained in:
@ -22,7 +22,7 @@ ENV PYTHONUNBUFFERED 1
|
||||
# Ref: https://github.com/pyca/cryptography/issues/5776
|
||||
ENV CRYPTOGRAPHY_DONT_BUILD_RUST 1
|
||||
|
||||
ENV INVENTREE_LOG_LEVEL="INFO"
|
||||
ENV INVENTREE_LOG_LEVEL="WARNING"
|
||||
ENV INVENTREE_DOCKER="true"
|
||||
|
||||
# InvenTree paths
|
||||
|
@ -875,29 +875,31 @@ REMOTE_LOGIN_HEADER = get_setting('INVENTREE_REMOTE_LOGIN_HEADER', CONFIG.get('r
|
||||
# Markdownify configuration
|
||||
# Ref: https://django-markdownify.readthedocs.io/en/latest/settings.html
|
||||
|
||||
MARKDOWNIFY_WHITELIST_TAGS = [
|
||||
'a',
|
||||
'abbr',
|
||||
'b',
|
||||
'blockquote',
|
||||
'em',
|
||||
'h1', 'h2', 'h3',
|
||||
'i',
|
||||
'img',
|
||||
'li',
|
||||
'ol',
|
||||
'p',
|
||||
'strong',
|
||||
'ul'
|
||||
]
|
||||
|
||||
MARKDOWNIFY_WHITELIST_ATTRS = [
|
||||
'href',
|
||||
'src',
|
||||
'alt',
|
||||
]
|
||||
|
||||
MARKDOWNIFY_BLEACH = False
|
||||
MARKDOWNIFY = {
|
||||
'default': {
|
||||
'BLEACH': True,
|
||||
'WHITELIST_ATTRS': [
|
||||
'href',
|
||||
'src',
|
||||
'alt',
|
||||
],
|
||||
'WHITELIST_TAGS': [
|
||||
'a',
|
||||
'abbr',
|
||||
'b',
|
||||
'blockquote',
|
||||
'em',
|
||||
'h1', 'h2', 'h3',
|
||||
'i',
|
||||
'img',
|
||||
'li',
|
||||
'ol',
|
||||
'p',
|
||||
'strong',
|
||||
'ul'
|
||||
],
|
||||
}
|
||||
}
|
||||
|
||||
# Error reporting
|
||||
SENTRY_ENABLED = get_setting('INVENTREE_SENTRY_ENABLED', CONFIG.get('sentry_enabled', False))
|
||||
|
@ -1,5 +1,7 @@
|
||||
"""Tests for core_notifications."""
|
||||
|
||||
from django.core import mail
|
||||
|
||||
from part.test_part import BaseNotificationIntegrationTest
|
||||
from plugin import registry
|
||||
from plugin.builtin.integration.core_notifications import \
|
||||
@ -12,6 +14,9 @@ class CoreNotificationTestTests(BaseNotificationIntegrationTest):
|
||||
|
||||
def test_email(self):
|
||||
"""Ensure that the email notifications run."""
|
||||
# No email should be send
|
||||
self.assertEqual(len(mail.outbox), 0)
|
||||
|
||||
# enable plugin and set mail setting to true
|
||||
plugin = registry.plugins.get('corenotificationsplugin')
|
||||
plugin.set_setting('ENABLE_NOTIFICATION_EMAILS', True)
|
||||
@ -25,3 +30,6 @@ class CoreNotificationTestTests(BaseNotificationIntegrationTest):
|
||||
|
||||
# run through
|
||||
self._notification_run(CoreNotificationsPlugin.EmailNotification)
|
||||
|
||||
# Now one mail should be send
|
||||
self.assertEqual(len(mail.outbox), 1)
|
||||
|
@ -1,6 +1,7 @@
|
||||
# Please keep this list sorted - if you pin a version provide a reason
|
||||
Django<4 # Django package
|
||||
coreapi # API documentation for djangorestframework
|
||||
cryptography==3.4.8 # Core cryptographic functionality
|
||||
django-allauth # SSO for external providers via OpenID
|
||||
django-allauth-2fa # MFA / 2FA
|
||||
django-cleanup # Automated deletion of old / unused uploaded files
|
||||
|
@ -30,8 +30,10 @@ coreapi==2.3.3
|
||||
# via -r requirements.in
|
||||
coreschema==0.0.4
|
||||
# via coreapi
|
||||
cryptography==37.0.2
|
||||
# via pyjwt
|
||||
cryptography==3.4.8
|
||||
# via
|
||||
# -r requirements.in
|
||||
# pyjwt
|
||||
cssselect2==0.6.0
|
||||
# via weasyprint
|
||||
defusedxml==0.7.1
|
||||
|
Reference in New Issue
Block a user