From be2f277eb38f3c3403f7d9946ff1f21824748722 Mon Sep 17 00:00:00 2001 From: Johannes Schriewer Date: Tue, 26 Dec 2023 01:19:59 +0100 Subject: [PATCH] update asgi starter to 5.0 --- inventory_project/asgi.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/inventory_project/asgi.py b/inventory_project/asgi.py index ab1846a..9f8221c 100644 --- a/inventory_project/asgi.py +++ b/inventory_project/asgi.py @@ -4,15 +4,13 @@ ASGI config for inventory_project project. It exposes the ASGI callable as a module-level variable named ``application``. For more information on this file, see -https://docs.djangoproject.com/en/3.0/howto/deployment/asgi/ +https://docs.djangoproject.com/en/5.0/howto/deployment/asgi/ """ import os -from channels.routing import ProtocolTypeRouter + +from django.core.asgi import get_asgi_application os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'inventory_project.settings') - -application = ProtocolTypeRouter({ - # (http->django views is added by default) -}) +application = get_asgi_application()