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.

checks.py 722B

1 year ago
123456789101112131415161718192021
  1. # Django system check to ensure daphne app is listed in INSTALLED_APPS before django.contrib.staticfiles.
  2. from django.core.checks import Error, register
  3. @register()
  4. def check_daphne_installed(app_configs, **kwargs):
  5. from django.apps import apps
  6. from django.contrib.staticfiles.apps import StaticFilesConfig
  7. from daphne.apps import DaphneConfig
  8. for app in apps.get_app_configs():
  9. if isinstance(app, DaphneConfig):
  10. return []
  11. if isinstance(app, StaticFilesConfig):
  12. return [
  13. Error(
  14. "Daphne must be listed before django.contrib.staticfiles in INSTALLED_APPS.",
  15. id="daphne.E001",
  16. )
  17. ]