I found in Django docs (https://docs.djangoproject.com/en/3.0/topics/http/urls/#passing-extra-options-to-include) that I can pass any constant into include() statement. Here in docs' example we are passing blog_id=3.
from django.urls import include, path
urlpatterns = [
path('blog/', include('inner'), {'blog_id': 3}),
]
But what if I want to pass dynamic url parameter into include()? I mean something like this:
from django.urls import include, path
urlpatterns = [
path('blog/<int:blog_id>/', include('inner'), {'blog_id': ???}),
]
Is it possible?
blog_id. It will simply be included in the kwargs of the included urls.