utils.py 285 B

1234567891011
  1. from django.conf import settings
  2. from django.contrib.messages import constants
  3. def get_level_tags():
  4. """
  5. Returns the message level tags.
  6. """
  7. level_tags = constants.DEFAULT_TAGS.copy()
  8. level_tags.update(getattr(settings, 'MESSAGE_TAGS', {}))
  9. return level_tags