[issue44577] Probably defect in Python 3.7.11

Vladislav Kozlenko report at bugs.python.org
Wed Jul 7 10:38:46 EDT 2021


Vladislav Kozlenko <vladislavko at softwareplanet.uk.com> added the comment:

It will be not easy as I'll need to create some sandbox for you. The current code version is not available for sharing.


But ok. For example here is a routing.py file:

from django.conf.urls import url
from channels.routing import ProtocolTypeRouter, URLRouter
from channels.security.websocket import AllowedHostsOriginValidator
from channels.auth import AuthMiddlewareStack
from some_dir import MyConsumer

application = ProtocolTypeRouter({
    'websocket': AllowedHostsOriginValidator(
        AuthMiddlewareStack(
            URLRouter([
                url('api/socket/end-point-1', MyConsumer),
            ])
        )
    )
})

Let me know if you need more information

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44577>
_______________________________________


More information about the Python-bugs-list mailing list