django reverse with parameters code example
Example 1: django reverse
from django.urls import reverse
def myview(request):
return HttpResponseRedirect(reverse('arch-summary', args=[1945]))
Example 2: django add queury parameters to reverse
response = self.client.get('%s?param1=%s' % (reverse('url'), 'param1_value'))