[Django]-How to pass two different arguments in a single function in django?

4👍

You can extend your path with an aribitrary number of parameters, here for example the pattern should probably look like:

path('confirm/<int:pk>/<int:bi>', teachers.ConfirmRFQ, name='ConfirmRFQ'),

So the view requires two parameters here: pk and bi.

In your template for example, you can then retrieve the URL by passing two parameters like:

{% url 'teachers:ConfirmRFQ' pk=quiz.pk bi=mybid.pk %}

Note however that updating entities is typically not done through a GET request (since a GET request should not have any side-effects), but through a POST request.

Leave a comment