'How to use multi-level {%url%} with Django in HTML template - Class Based Views

Im utilizing class based views: I have an app that has 1 urls file in app, 2 sublevels urls files and 1 view file from my last sublevel urls file

portfolio_menu.urls:

app_name = 'portfolio'
    urlpatterns = [
        path('test', include('store.urls', namespace='store')),
        path('', views.menu),
    ]

store.urls:

app_name = 'store
urlpatterns = [
    path('', include('product.urls', namespace='product')),
]

product.urls:

app_name = 'product'
urlpatterns = [
    path('', views.ProductListView.as_view(), name='list'),
]

the funcion I want to get, but don't know the sintax:

<a href="{%url portfolio:store:product:list%}"></a> #I wish something like that


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source