diff --git a/InvenTree/InvenTree/settings.py b/InvenTree/InvenTree/settings.py index 7ff90fc7c3..3f9c2d6cec 100644 --- a/InvenTree/InvenTree/settings.py +++ b/InvenTree/InvenTree/settings.py @@ -21,6 +21,7 @@ from datetime import datetime import yaml from django.utils.translation import gettext_lazy as _ +from django.contrib.messages import constants as messages def _is_true(x): @@ -593,3 +594,9 @@ IMPORT_EXPORT_USE_TRANSACTIONS = True INTERNAL_IPS = [ '127.0.0.1', ] + +MESSAGE_TAGS = { + messages.SUCCESS: 'alert alert-block alert-success', + messages.ERROR: 'alert alert-block alert-danger', + messages.INFO: 'alert alert-block alert-info', +} diff --git a/InvenTree/part/templates/part/category.html b/InvenTree/part/templates/part/category.html index b79ee0ee60..0b7fbba8f5 100644 --- a/InvenTree/part/templates/part/category.html +++ b/InvenTree/part/templates/part/category.html @@ -8,6 +8,15 @@ {% block content %} +{% if messages %} + {% for message in messages %} +
+ {% endfor %} +{% endif %} + +