Вы должны использовать kwargs-подобный синтаксис:
<a href="{% url 'webpages:articles_detail' pk=post.pk slug=post.slug %}">{{post.title}}</a>
Полный пример:
... / some_app / views.py
from django.template.response import TemplateResponse
def some_view(request):
return TemplateResponse(request, 'some_app/some_template.html')
def another_view(request, first_arg, second_arg):
return TemplateResponse(
request, 'some_app/another_template.html',
context={'first_arg': first_arg, 'second_arg': second_arg}
)
... /some_app/templates/some_app/some_template.html
<html>
<body>
<h1><a href={% url 'another_view' first_arg=1 second_arg=2 %}>Click here to go to another_view </a></h1>
</body>
</html>
... / some_app / templates / some_app / another_template. html
<html>
<body>
<h1>{{ first_arg }} | {{ second_arg }}</h1>
</body>
</html>
... / some_app /urls.py
# ...
urlpatterns = [
path('some_view/', some_view),
path('another_view/<int:first_arg>/<int:second_arg>/', another_view, name='another_view')
]
# ...