utils.py 256 B

123456789101112
  1. from django.conf import settings
  2. from django.contrib.messages import constants
  3. def get_level_tags():
  4. """
  5. Return the message level tags.
  6. """
  7. return {
  8. **constants.DEFAULT_TAGS,
  9. **getattr(settings, "MESSAGE_TAGS", {}),
  10. }