+ 1
How to pass <str:—-> argument to REVERSE in Django?
I want to return(reverse()) the “EDIT” function to the url which is this -> path(“<str:search>”, views.search, name=“search”) I want to pass the “edit” (str) to the search named url!! How can I do this def edit(request, edit): ... ... context = [ ‘edit’: edit ] ... ... return redirect(‘search’ , ____) <—- argument here
1 Respuesta
+ 2
In django You can not pass parameters with redirect. Your only bet is to pass them as a part of URL.