Dynamic URL with variable django template
You can use the add template filter:
{% url "base:"|add:section pk=project.id %}
for my case that also worked
{% for section in sections %}
<a href="{% url "base" pk=object.id %}">..</a>
{% endfor %}
where url pattern is
url=[
path('base/<pk>/',base,name='base'),
]