Open jjjkkkjjj opened 2 weeks ago
I re-created a new PR (#2037)
I tried to implement to support URLRouter with include. This will be helpful project structure organized well.
URLRouter
include
Usage:
In parent's routings.py;
routings.py
urlpatterns = [ path('chats/', include('pj.chats.routings'), name='chats'), ]
In child's routings.py;
app_name = 'chats' urlpatterns = [ re_path(r"/(?P<room_name>\w+)/chat/$", ChatConsumer.as_asgi()), ]
Also, I've implemented the unittest for it in test_url_router_nesting_by_include in tests/test_routing.py.
test_url_router_nesting_by_include
tests/test_routing.py
I re-created a new PR (#2037)
I tried to implement to support
URLRouter
withinclude
. This will be helpful project structure organized well.Usage:
In parent's
routings.py
;In child's
routings.py
;Also, I've implemented the unittest for it in
test_url_router_nesting_by_include
intests/test_routing.py
.