Skip to content

Commit b6dc8c1

Browse files
authored
Import consumers after AppRegistry is populated in tutorial step 2. (#2068)
1 parent a6d7f71 commit b6dc8c1

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

docs/tutorial/part_2.rst

+1-3
Original file line numberDiff line numberDiff line change
@@ -263,14 +263,12 @@ The next step is to point the main ASGI configuration at the
263263
from channels.security.websocket import AllowedHostsOriginValidator
264264
from django.core.asgi import get_asgi_application
265265
266-
from chat.routing import websocket_urlpatterns
267-
268266
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "mysite.settings")
269267
# Initialize Django ASGI application early to ensure the AppRegistry
270268
# is populated before importing code that may import ORM models.
271269
django_asgi_app = get_asgi_application()
272270
273-
import chat.routing
271+
from chat.routing import websocket_urlpatterns
274272
275273
application = ProtocolTypeRouter(
276274
{

0 commit comments

Comments
 (0)