1
You can’t get a form field to automatically put its value into the URL the form is submitting to (except by mucking about with the form in Javascript, which would be horrible).
But as you can see, you do get that data in the request parameters: since you’re doing a GET, it’s in request.GET['searchname']
. So why don’t you drop the username
parameter to the URL/view in the first place, and just use that?
Source:stackexchange.com