[Fixed]-Django: How to pass variable on form submit

1πŸ‘

βœ…

In the first case, the view is responding to an http GET request, so request.GET contains your project parameter. When the form is submitted, now the view is responsing to an http POST request, and request.POST contains the form data. In the latter case, if you want request.GET to still contain the β€˜project’ parameter, then you can pass it via the form action parameter in your form tag:

form action=”/some/url/?project={{ sys_project_name }}”

πŸ‘€FriC

Leave a comment