mirror of
https://github.com/inventree/InvenTree.git
synced 2025-06-16 12:05:53 +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
|
# Ref: https://github.com/pyca/cryptography/issues/5776
|
||||||
ENV CRYPTOGRAPHY_DONT_BUILD_RUST 1
|
ENV CRYPTOGRAPHY_DONT_BUILD_RUST 1
|
||||||
|
|
||||||
ENV INVENTREE_LOG_LEVEL="INFO"
|
ENV INVENTREE_LOG_LEVEL="WARNING"
|
||||||
ENV INVENTREE_DOCKER="true"
|
ENV INVENTREE_DOCKER="true"
|
||||||
|
|
||||||
# InvenTree paths
|
# InvenTree paths
|
||||||
|
@ -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))
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
"""Tests for core_notifications."""
|
"""Tests for core_notifications."""
|
||||||
|
|
||||||
|
from django.core import mail
|
||||||
|
|
||||||
from part.test_part import BaseNotificationIntegrationTest
|
from part.test_part import BaseNotificationIntegrationTest
|
||||||
from plugin import registry
|
from plugin import registry
|
||||||
from plugin.builtin.integration.core_notifications import \
|
from plugin.builtin.integration.core_notifications import \
|
||||||
@ -12,6 +14,9 @@ class CoreNotificationTestTests(BaseNotificationIntegrationTest):
|
|||||||
|
|
||||||
def test_email(self):
|
def test_email(self):
|
||||||
"""Ensure that the email notifications run."""
|
"""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
|
# enable plugin and set mail setting to true
|
||||||
plugin = registry.plugins.get('corenotificationsplugin')
|
plugin = registry.plugins.get('corenotificationsplugin')
|
||||||
plugin.set_setting('ENABLE_NOTIFICATION_EMAILS', True)
|
plugin.set_setting('ENABLE_NOTIFICATION_EMAILS', True)
|
||||||
@ -25,3 +30,6 @@ class CoreNotificationTestTests(BaseNotificationIntegrationTest):
|
|||||||
|
|
||||||
# run through
|
# run through
|
||||||
self._notification_run(CoreNotificationsPlugin.EmailNotification)
|
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
|
# Please keep this list sorted - if you pin a version provide a reason
|
||||||
Django<4 # Django package
|
Django<4 # Django package
|
||||||
coreapi # API documentation for djangorestframework
|
coreapi # API documentation for djangorestframework
|
||||||
|
cryptography==3.4.8 # Core cryptographic functionality
|
||||||
django-allauth # SSO for external providers via OpenID
|
django-allauth # SSO for external providers via OpenID
|
||||||
django-allauth-2fa # MFA / 2FA
|
django-allauth-2fa # MFA / 2FA
|
||||||
django-cleanup # Automated deletion of old / unused uploaded files
|
django-cleanup # Automated deletion of old / unused uploaded files
|
||||||
|
@ -30,8 +30,10 @@ coreapi==2.3.3
|
|||||||
# via -r requirements.in
|
# via -r requirements.in
|
||||||
coreschema==0.0.4
|
coreschema==0.0.4
|
||||||
# via coreapi
|
# via coreapi
|
||||||
cryptography==37.0.2
|
cryptography==3.4.8
|
||||||
# via pyjwt
|
# via
|
||||||
|
# -r requirements.in
|
||||||
|
# pyjwt
|
||||||
cssselect2==0.6.0
|
cssselect2==0.6.0
|
||||||
# via weasyprint
|
# via weasyprint
|
||||||
defusedxml==0.7.1
|
defusedxml==0.7.1
|
||||||
|
Reference in New Issue
Block a user