How to pass parameters into url after render() in Django?
You're completely overthinking this. There's nothing different here from any other request: the form submits via GET to the results view, the view gets the search query from request.GET["q"] or wherever, does the search and passes the results to the template.
I'm trying to use Google's Custom Search Engine product to display results from a query on a page for a personal web app.
How CSE is working is that it takes parameters from the URL as search terms: i.e., www.mydomain.com/results.html?q=hello+world would return results for a "hello world" query on the page. You put some JS code they give you on your page, so it's a bit of a black box.
However, with URL routing and render() on Django, I'm guessing the basics is that www.mydomain.com/results gets routed to a views.results calls which renders results.html as www.mydomain.com/results.
What is the best-practice for submitting a query through a form, and passing it to www.mydomain.com/results.html?q=hello+world instead of redirecting to www.mydomain.com/results and having Django render the results/html file?
Sorry, I'm relatively new. I can try to piece things together, but I feel there has got to be a very efficient way of handling this situation. Thanks for understanding