diff --git a/daphne/apps.py b/daphne/apps.py index 3a566ea..de104db 100644 --- a/daphne/apps.py +++ b/daphne/apps.py @@ -1,12 +1,13 @@ # Import the server here to ensure the reactor is installed very early on in case other # packages import twisted.internet.reactor (e.g. raven does this). -import daphne.server # noqa: F401 - from django.apps import AppConfig from django.core import checks +import daphne.server # noqa: F401 + from .checks import check_daphne_installed + class DaphneConfig(AppConfig): name = "daphne" verbose_name = "Daphne" diff --git a/daphne/management/commands/runserver.py b/daphne/management/commands/runserver.py index 0ebde5f..b2fd2ee 100644 --- a/daphne/management/commands/runserver.py +++ b/daphne/management/commands/runserver.py @@ -33,7 +33,7 @@ def get_default_application(): value = getattr(module, name) except AttributeError: raise ImproperlyConfigured( - "Cannot find {!r} in ASGI_APPLICATION module {}".format(name, path) + f"Cannot find {name!r} in ASGI_APPLICATION module {path}" ) return value