Routing
- chanx.routing.include(arg: URLRouter | str | ModuleType) URLRouter
Include router from another module for Channels routing.
Similar to Django's URL include function, but designed for Channels routing. This allows for modular organization of WebSocket routing configurations.
This function can handle: - A URLRouter instance (returned as-is) - A string path to a module with a 'router' attribute - A module object with a 'router' attribute
The 'router' attribute should be a URLRouter instance.
- Parameters:
arg -- Either a URLRouter instance, a string path to a module, or the module itself. For string paths or modules, they should have a 'router' attribute.
- Returns:
The URLRouter instance from the module.