Funktionierender Prototyp des Serious Games zur Vermittlung von Wissen zu Software-Engineering-Arbeitsmodellen.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

apps.py 542B

1 year ago
123456789101112131415161718
  1. from django.apps import AppConfig
  2. from django.contrib.messages.storage import base
  3. from django.contrib.messages.utils import get_level_tags
  4. from django.core.signals import setting_changed
  5. from django.utils.translation import gettext_lazy as _
  6. def update_level_tags(setting, **kwargs):
  7. if setting == "MESSAGE_TAGS":
  8. base.LEVEL_TAGS = get_level_tags()
  9. class MessagesConfig(AppConfig):
  10. name = "django.contrib.messages"
  11. verbose_name = _("Messages")
  12. def ready(self):
  13. setting_changed.connect(update_level_tags)